llvm-project/clang/lib/StaticAnalyzer/Core
Yunzhong Gao cb77930d6b Implementing C99 partial re-initialization behavior (DR-253)
Based on previous discussion on the mailing list, clang currently lacks support
for C99 partial re-initialization behavior:
Reference: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-April/029188.html
Reference: http://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_253.htm

This patch attempts to fix this problem.

Given the following code snippet,

struct P1 { char x[6]; };
struct LP1 { struct P1 p1; };

struct LP1 l = { .p1 = { "foo" }, .p1.x[2] = 'x' };
// this example is adapted from the example for "struct fred x[]" in DR-253;
// currently clang produces in l: { "\0\0x" },
//   whereas gcc 4.8 produces { "fox" };
// with this fix, clang will also produce: { "fox" };


Differential Review: http://reviews.llvm.org/D5789

llvm-svn: 239446
2015-06-10 00:27:52 +00:00
..
APSIntType.cpp [analyzer] Teach constraint managers about unsigned comparisons. 2013-03-23 01:21:33 +00:00
AnalysisManager.cpp Add support for the static analyzer to synthesize function implementations from external model files. 2014-08-27 15:14:15 +00:00
AnalyzerOptions.cpp [analyzer] Individual configuration options can be specified for checkers. 2015-03-04 17:59:34 +00:00
BasicValueFactory.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
BlockCounter.cpp [C++11] Simplify compare operators with std::tie. 2014-03-03 20:26:46 +00:00
BugReporter.cpp Prefer SmallVector::append/insert over push_back loops. Clang edition. 2015-02-17 16:48:30 +00:00
BugReporterVisitors.cpp Update APIs that return a pair of iterators to return an iterator_range instead. 2015-02-06 17:25:10 +00:00
CMakeLists.txt Make clang's rewrite engine a core feature 2014-07-16 16:48:33 +00:00
CallEvent.cpp Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or just letting them be implicitly created. 2014-08-27 06:28:36 +00:00
Checker.cpp Analyzer: Replace a set of particularly ugly faux variadics. 2015-02-15 20:11:07 +00:00
CheckerContext.cpp Cleanup handling of UniqueExternalLinkage. 2013-05-13 00:12:11 +00:00
CheckerHelpers.cpp
CheckerManager.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
CheckerRegistry.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
CommonBugCategories.cpp [analyzer] Replace bug category magic strings with shared constants, take 2. 2013-10-04 00:25:24 +00:00
ConstraintManager.cpp
CoreEngine.cpp Simplify ownership of ExplodedGraph in the CoreEngine by removing unique_ptr indirection. 2014-08-08 23:36:37 +00:00
Environment.cpp Removing an "if (this == nullptr)" check from two print methods. The condition 2014-06-09 22:53:25 +00:00
ExplodedGraph.cpp Reduce double set lookups. NFC. 2014-10-10 15:32:48 +00:00
ExprEngine.cpp Implementing C99 partial re-initialization behavior (DR-253) 2015-06-10 00:27:52 +00:00
ExprEngineC.cpp Test commit, no changes. 2015-01-20 09:47:57 +00:00
ExprEngineCXX.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
ExprEngineCallAndReturn.cpp Do not inline methods of C++ containers (coming from headers). 2014-06-27 01:03:05 +00:00
ExprEngineObjC.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
FunctionSummary.cpp [analyzer] Use inline storage in the FunctionSummary DenseMap. 2013-04-02 00:26:26 +00:00
HTMLDiagnostics.cpp Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:00:23 +00:00
Makefile
MemRegion.cpp Update APIs that return a pair of iterators to return an iterator_range instead. 2015-02-06 17:25:10 +00:00
PathDiagnostic.cpp [Analyzer] Don't inherit from FoldingSet. 2015-03-22 18:16:22 +00:00
PlistDiagnostics.cpp Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:00:23 +00:00
PrettyStackTraceLocationContext.h Header guard canonicalization, clang part. 2014-08-13 16:25:19 +00:00
ProgramState.cpp unique_ptrify the result of ConstraintManagerCreator and StoreManagerCreator 2014-09-04 23:54:37 +00:00
RangeConstraintManager.cpp unique_ptrify the result of ConstraintManagerCreator and StoreManagerCreator 2014-09-04 23:54:37 +00:00
RegionStore.cpp Make helper functions static. NFC. 2015-03-09 16:47:52 +00:00
SValBuilder.cpp [analyzer] Always use 'bool' as the SValBuilder condition type in C++. 2013-12-19 22:32:39 +00:00
SVals.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
SimpleConstraintManager.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
SimpleConstraintManager.h Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:00:23 +00:00
SimpleSValBuilder.cpp Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:00:23 +00:00
Store.cpp [analyzer] Refactor and cleanup IsCompleteType 2014-10-03 21:49:03 +00:00
SubEngine.cpp
SymbolManager.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00