llvm-project/clang/lib
Kristof Umann 4962816e72 [analyzer] Fix an assertation failure for invalid sourcelocation, add a new debug checker
For a rather short code snippet, if debug.ReportStmts (added in this patch) was
enabled, a bug reporter visitor crashed:

struct h {
  operator int();
};

int k() {
  return h();
}

Ultimately, this originated from PathDiagnosticLocation::createMemberLoc, as it
didn't handle the case where it's MemberExpr typed parameter returned and
invalid SourceLocation for MemberExpr::getMemberLoc. The solution was to find
any related valid SourceLocaion, and Stmt::getBeginLoc happens to be just that.

Differential Revision: https://reviews.llvm.org/D58777

llvm-svn: 356161
2019-03-14 16:10:29 +00:00
..
ARCMigrate Fix file headers. NFC 2019-03-01 06:49:51 +00:00
AST [ASTImporter] Fix import of NestedNameSpecifierLoc. 2019-03-14 14:20:23 +00:00
ASTMatchers [ASTImporter] Add support for importing ChooseExpr AST nodes. 2019-02-26 19:26:41 +00:00
Analysis [analyzer] handle modification of vars inside an expr with comma operator 2019-03-07 15:50:52 +00:00
Basic [X86] Only define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 in 64-bit mode. 2019-03-14 05:45:42 +00:00
CodeGen [CodeGen][ObjC] Remove the leading 'l' from symbols for protocol 2019-03-14 15:17:37 +00:00
CrossTU [CTU] Do not allow different CPP dialects in CTU 2019-02-28 15:24:59 +00:00
Driver Fix invocation of Gold plugin with LTO after r355331 2019-03-13 23:54:52 +00:00
Edit [Fixed Point Arithmetic] Fixed Point and Integer Conversions 2019-03-06 00:28:43 +00:00
Format [clang-format] Propagate inferred language to getLLVMStyle() in getPredefinedStyle() 2019-03-13 21:13:01 +00:00
Frontend Reland "[Remarks] Add -foptimization-record-passes to filter remark emission" 2019-03-12 21:22:27 +00:00
FrontendTool [analyzer][NFC] Supply CheckerRegistry with AnalyzerOptions 2019-01-26 15:59:21 +00:00
Headers [build] Rename clang-headers to clang-resource-headers 2019-03-04 21:19:53 +00:00
Index [clang][Index] Mark references from Constructors and Destructors to class as NameReference 2019-03-08 08:30:20 +00:00
Lex Modules: Rename MemoryBufferCache to InMemoryModuleCache 2019-03-09 17:33:56 +00:00
Parse Objective-C++11: Support static_assert() in @interface/@implementation ivar lists and method declarations 2019-03-14 14:18:56 +00:00
Rewrite Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Sema Objective-C++11: Support static_assert() in @interface/@implementation ivar lists and method declarations 2019-03-14 14:18:56 +00:00
Serialization [NFC][clang][PCH][ObjC] Add some missing `VisitStmt(S);` 2019-03-12 21:31:00 +00:00
StaticAnalyzer [analyzer] Fix an assertation failure for invalid sourcelocation, add a new debug checker 2019-03-14 16:10:29 +00:00
Tooling [LibTooling] Add retrieval of extended AST-node source to FixIt library 2019-03-13 19:48:51 +00:00
CMakeLists.txt