Revert "[clang][analyzer] Fix a nullptr dereference when -ftime-trace is used" (#139936)
Reverts llvm/llvm-project#139820 Reverting due to buildbot failures in asan
This commit is contained in:
@@ -103,10 +103,7 @@ public:
|
||||
const Stmt *getStmt() const {
|
||||
switch (Elem->getKind()) {
|
||||
case CFGElement::Initializer:
|
||||
if (const auto *Init = Elem->castAs<CFGInitializer>().getInitializer()) {
|
||||
return Init->getInit();
|
||||
}
|
||||
return nullptr;
|
||||
return Elem->castAs<CFGInitializer>().getInitializer()->getInit();
|
||||
case CFGElement::ScopeBegin:
|
||||
return Elem->castAs<CFGScopeBegin>().getTriggerStmt();
|
||||
case CFGElement::ScopeEnd:
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
// RUN: %clang_analyze_cc1 -analyzer-checker=core,apiModeling %s -ftime-trace=%t.raw.json -verify
|
||||
// expected-no-diagnostics
|
||||
|
||||
// GitHub issue 139779
|
||||
struct {} a; // no-crash
|
||||
Reference in New Issue
Block a user