llvm-project/clang/lib
Vedant Kumar a14a1f923f [Parse] Forward brace locations to TypeConstructExpr
When parsing C++ type construction expressions with list initialization,
forward the locations of the braces to Sema.

Without these locations, the code coverage pass crashes on the given test
case, because the pass relies on getLocEnd() returning a valid location.

Here is what this patch does in more detail:

  - Forwards init-list brace locations to Sema (ParseExprCXX),
  - Builds an InitializationKind with these locations (SemaExprCXX), and
  - Uses these locations for constructor initialization (SemaInit).

The remaining changes fall out of introducing a new overload for
creating direct-list InitializationKinds.

Testing: check-clang, and a stage2 coverage-enabled build of clang with
asserts enabled.

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

llvm-svn: 322729
2018-01-17 18:53:51 +00:00
..
ARCMigrate Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC. 2017-06-03 06:23:19 +00:00
AST Ensure code complete with !LoadExternal sees all local decls. 2018-01-16 12:33:46 +00:00
ASTMatchers Remove creation of out-of-bounds value of enumeration type (resulting in UB). 2017-12-08 23:29:59 +00:00
Analysis Handle scoped_lockable objects being returned by value in C++17. 2018-01-11 22:13:57 +00:00
Basic Make DiagnosticsEngine() take DiagOpts as DiagnosticsEngine. 2018-01-17 02:55:27 +00:00
CodeGen [Parse] Forward brace locations to TypeConstructExpr 2018-01-17 18:53:51 +00:00
CrossTU [CrossTU] Fix handling of Cross Translation Unit directory path 2017-10-27 12:53:37 +00:00
Driver [clang-cl] Let /FA output use intel assembly. 2018-01-17 13:34:20 +00:00
Edit [clang] Fix format specifiers fixits for nested macros 2017-06-20 20:46:58 +00:00
Format [Format] Improve ObjC header guessing heuristic 2018-01-17 17:33:08 +00:00
Frontend Revert 319303: Add _Float128 as alias to __float128 to enable compilations on Fedora27/glibc2 2018-01-15 21:16:25 +00:00
FrontendTool [CMake] Use #cmakedefine01 for CLANG_ENABLE_(ARCMT|OBJC_REWRITER|STATIC_ANALYZER) 2017-10-18 05:21:17 +00:00
Headers [X86] Implement old kunpck intrinsics using vector ops on vXi1 instead of integer shift/and/or 2018-01-14 19:23:50 +00:00
Index [Index] Reduce size of SymbolInfo struct. 2017-12-23 19:31:24 +00:00
Lex [PCH] Serialize skipped preprocessor ranges 2018-01-15 19:14:16 +00:00
Parse [Parse] Forward brace locations to TypeConstructExpr 2018-01-17 18:53:51 +00:00
Rewrite [analyzer] support a mode to only show relevant lines in HTML diagnostics 2018-01-17 02:59:11 +00:00
Sema [Parse] Forward brace locations to TypeConstructExpr 2018-01-17 18:53:51 +00:00
Serialization [PCH] Serialize skipped preprocessor ranges 2018-01-15 19:14:16 +00:00
StaticAnalyzer [analyzer] support a mode to only show relevant lines in HTML diagnostics 2018-01-17 02:59:11 +00:00
Tooling [Tooling] Don't deduplicate tool results in the All-TUs executor. 2018-01-17 17:37:11 +00:00
CMakeLists.txt Add Cross Translation Unit support library 2017-09-22 11:11:01 +00:00