hanchenye-llvm-project/clang/test/CoverageMapping
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
..
Inputs [Coverage] Emit deferred regions in headers 2017-11-09 02:33:40 +00:00
abspath.cpp [clang] Get rid of "%T" expansions 2017-08-15 19:47:06 +00:00
block-storage-starts-region.m
break.c [Coverage] Emit gap areas in braces-optional statements (PR35387) 2017-11-29 22:25:14 +00:00
builtinmacro.c
casts.c [Coverage] Emit a gap area after if conditions 2017-11-09 02:33:38 +00:00
classtemplate.cpp [Parse] Forward brace locations to TypeConstructExpr 2018-01-17 18:53:51 +00:00
comment-in-macro.c
continue.c [Coverage] Emit gap areas in braces-optional statements (PR35387) 2017-11-29 22:25:14 +00:00
control-flow-macro.c
decl.c
deferred-region.cpp [Coverage] Emit deferred regions in headers 2017-11-09 02:33:40 +00:00
empty-destructor.cpp [Coverage] Avoid null deref in skipRegionMappingForDecl (fixes PR32761) 2017-04-24 20:52:04 +00:00
header.cpp [Coverage] Add an option to emit limited coverage info 2017-09-22 18:23:04 +00:00
if.cpp [Coverage] Emit gap areas in braces-optional statements (PR35387) 2017-11-29 22:25:14 +00:00
implicit-def-in-macro.m
include-macros.c
includehell.cpp [Coverage] Emit gap areas in braces-optional statements (PR35387) 2017-11-29 22:25:14 +00:00
ir.c
label.cpp [Coverage] Emit gap areas in braces-optional statements (PR35387) 2017-11-29 22:25:14 +00:00
lambda.cpp
logical.cpp [Coverage] Explicitly mark the l.h.s of && and || (fixes PR33465) 2017-10-17 06:51:54 +00:00
loopmacro.c
loops.cpp [Coverage] Emit gap areas in braces-optional statements (PR35387) 2017-11-29 22:25:14 +00:00
macro-expansion.c [Coverage] Emit a gap area after if conditions 2017-11-09 02:33:38 +00:00
macro-expressions.cpp [Coverage] Emit gap areas in braces-optional statements (PR35387) 2017-11-29 22:25:14 +00:00
macroception.c
macroparams.c
macroparams2.c
macros.c [Coverage] Emit gap areas in braces-optional statements (PR35387) 2017-11-29 22:25:14 +00:00
macroscopes.cpp [Coverage] Emit a gap area after if conditions 2017-11-09 02:33:38 +00:00
md.cpp [coverage] Special-case calls to noreturn functions. 2017-08-08 20:10:14 +00:00
moremacros.c [Coverage] Emit a gap area after if conditions 2017-11-09 02:33:38 +00:00
nestedclass.cpp
objc.m [Coverage] Emit gap areas in braces-optional statements (PR35387) 2017-11-29 22:25:14 +00:00
pr32679.cpp [Coverage] Don't emit mappings for functions in dependent contexts (fixes PR32679) 2017-04-19 17:58:30 +00:00
preprocessor.c [Coverage] Emit a gap area after if conditions 2017-11-09 02:33:38 +00:00
return.c [Coverage] Emit gap areas in braces-optional statements (PR35387) 2017-11-29 22:25:14 +00:00
switch.cpp [Coverage] Emit a gap area after if conditions 2017-11-09 02:33:38 +00:00
switchmacro.c [Coverage] Complete top-level deferred regions before labels 2017-11-09 02:33:39 +00:00
system_macro.cpp
templates.cpp
test.c [Coverage] Emit gap areas in braces-optional statements (PR35387) 2017-11-29 22:25:14 +00:00
trycatch.cpp [Coverage] Emit a gap area after if conditions 2017-11-09 02:33:38 +00:00
trymacro.cpp
unreachable-macro.c
unused_function.cpp
unused_names.c clang/test/CoverageMapping/unused_names.c: Relax an expression for targeting PECOFF. 2017-04-14 03:16:48 +00:00
while.c [Coverage] Emit gap areas in braces-optional statements (PR35387) 2017-11-29 22:25:14 +00:00