llvm-project/clang/unittests
Gabor Marton a20ce60e48 [ASTImporter] Merge ExprBits
Summary:
Some `Expr` classes set up default values for the `ExprBits` of `Stmt`.  These
default values are then overwritten by the parser sometimes.  One example is
`InitListExpr` which sets the value kind to be an rvalue in the ctor.  However,
this bit may change after the `InitListExpr` is created.  There may be other
expressions similar to `InitListExpr` in this sense, thus the safest solution
is to copy the expression bits.

The lack of copying `ExprBits` causes an assertion in the analyzer engine in a
specific case: Since the value kind is not imported, the analyzer engine
believes that the given InitListExpr is an rvalue, thus it creates a
nonloc::CompoundVal instead of creating memory region (as in case of an lvalue
reference).

Reviewers: a_sidorin, r.stahl, xazax.hun, a.sidorin

Subscribers: rnkovacs, dkrupp, cfe-commits

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

llvm-svn: 341316
2018-09-03 13:10:53 +00:00
..
AST [ASTImporter] Merge ExprBits 2018-09-03 13:10:53 +00:00
ASTMatchers Allow binding to NamedValue resulting from let expression 2018-08-30 23:11:09 +00:00
Analysis [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
Basic Add dump() method for SourceRange 2018-08-30 23:10:52 +00:00
CodeGen Unit tests for TBAA metadata generation. 2017-12-22 15:22:45 +00:00
CrossTU IWYU for llvm-config.h in clang. See r331124 for details. 2018-04-30 13:52:15 +00:00
Driver [VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name 2018-08-06 21:48:20 +00:00
Format Fix Bug 38713: clang-format mishandles a short block after "default:" in a switch statement 2018-09-02 09:04:51 +00:00
Frontend [Fixed Point Arithmetic] Fix for FixedPointValueToString 2018-08-06 16:05:08 +00:00
Lex Reland '[clang] Adding CharacteristicKind to PPCallbacks::InclusionDirective' 2018-05-10 19:05:36 +00:00
Rename Unittests misc. typos 2018-02-06 13:12:29 +00:00
Rewrite [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
Sema [SemaCodeComplete] Make sure visited contexts are passed to completion results handler. 2018-07-04 10:01:18 +00:00
StaticAnalyzer Fix unittest build with GCC older than 5. 2018-06-28 13:31:36 +00:00
Tooling Parse compile commands lazily in InterpolatingCompilationDatabase 2018-08-28 16:15:56 +00:00
libclang Revert r336590 "[libclang] evalute compound statement cursors before trying to evaluate" 2018-07-10 19:49:07 +00:00
CMakeLists.txt Add Cross Translation Unit support library 2017-09-22 11:11:01 +00:00