llvm-project/clang/test
George Burgess IV 4168d75888 [ExprConstant] Fix PR28314 - crash while evluating objectsize.
This fixes a crash in code like:
```
struct A {
  struct B b;
  char c[1];
}

int foo(struct A* a) { return __builtin_object_size(a->c, 0); }
```

We wouldn't check whether the structs we were examining were invalid,
and getting the layout of an invalid struct is (unsurprisingly) A Bad
Thing. With this patch, we'll always return conservatively if we see an
invalid struct, since I'm assuming the presence of an invalid struct
means that our compilation failed (so having a conservative result isn't
such a big deal).

llvm-svn: 273911
2016-06-27 19:40:41 +00:00
..
ARCMT
ASTMerge Added support to the ASTImporter for C++ constructor initializers. 2016-05-16 20:48:03 +00:00
Analysis DeadStoresChecker: Don't warn about dead stores into volatile variables 2016-06-24 16:26:43 +00:00
CXX Implement C++17 P0386R2, inline variables. (The 'inline' specifier gives a 2016-06-25 00:15:56 +00:00
CodeCompletion Fix a few issues while skipping function bodies 2016-06-16 21:40:06 +00:00
CodeGen [X86] add _mm_loadu_si64 2016-06-26 13:51:54 +00:00
CodeGenCUDA [CUDA] Add implicit conversion of __launch_bounds__ arguments to rvalue. 2016-06-06 22:54:57 +00:00
CodeGenCXX Fix bad test expectation. 2016-06-25 00:37:14 +00:00
CodeGenObjC Allow 'nodebug' on local variables. 2016-06-16 00:42:36 +00:00
CodeGenObjCXX Fix mangled name of method with ns_consumed parameters. 2016-05-25 14:15:08 +00:00
CodeGenOpenCL Attempt to fix MIPS buildbots after r273425. 2016-06-23 09:29:38 +00:00
Coverage
CoverageMapping [Coverage] Push a new region when handling CXXTryStmts 2016-06-22 19:57:58 +00:00
Driver [clang-cl] Implement support for /std 2016-06-27 02:32:12 +00:00
FixIt Re-commit r273548, reverted in r273589, with a fix to not produce 2016-06-23 19:02:52 +00:00
Format Fix clang-format test. I believe that the new behavior is better. 2015-11-23 08:50:52 +00:00
Frontend [OpenCL] Allow -std={cl|CL}{|1.1|1.2|2.0} in driver 2016-06-17 17:19:28 +00:00
Headers clang/test/Headers/opencl-c-header.cl: Add explicit -triple x86_64-unknown to appease *-win32 targets. 2016-06-21 01:54:54 +00:00
Index Make sizeof and alignof a CXCursor_UnaryExpr 2016-06-09 16:16:06 +00:00
Integration
Layout [MS ABI] Implement __declspec(empty_bases) and __declspec(layout_version) 2016-05-23 17:16:12 +00:00
Lexer Use the name of the file on disk to issue a new diagnostic about non-portable #include and #import paths. 2016-06-13 20:40:21 +00:00
Misc Update for DiagnosticInfoStackSize changes 2016-06-20 18:13:09 +00:00
Modules Restructure the propagation of -fPIC/-fPIE. 2016-06-23 15:07:32 +00:00
OpenMP [OpenMP] Diagnose missing cases of statements between target and teams directives 2016-06-27 19:15:43 +00:00
PCH CodeGen: support linker options on Windows ARM 2016-06-23 13:45:33 +00:00
Parser Re-commit r273548, reverted in r273589, with a fix to not produce 2016-06-23 19:02:52 +00:00
Preprocessor Restructure the propagation of -fPIC/-fPIE. 2016-06-23 15:07:32 +00:00
Profile Remove MaxFunctionCount module flag annotation. 2016-06-20 20:48:32 +00:00
Rewriter
Sema [ExprConstant] Fix PR28314 - crash while evluating objectsize. 2016-06-27 19:40:41 +00:00
SemaCUDA [CUDA] Add implicit conversion of __launch_bounds__ arguments to rvalue. 2016-06-06 22:54:57 +00:00
SemaCXX Re-commit r273548, reverted in r273589, with a fix to not produce 2016-06-23 19:02:52 +00:00
SemaObjC ObjC lifetime: pull sugar off when the qualifiers conflict. 2016-06-01 17:14:19 +00:00
SemaObjCXX Re-commit r273548, reverted in r273589, with a fix to not produce 2016-06-23 19:02:52 +00:00
SemaOpenCL Update clang for D20348 2016-06-14 21:02:05 +00:00
SemaTemplate Revert accidential "[MSVC] Late parsing of in-class defined member functions in template" 2016-06-15 11:24:54 +00:00
TableGen
Tooling Back out the test case for r266973 for now. 2016-04-21 10:46:14 +00:00
Unit Replace hardcoded comment at 'lit.site.cfg.in' 2016-04-16 06:54:46 +00:00
VFS [VFS] Fix status() of opened redirected file 2015-12-10 23:41:39 +00:00
.clang-format
CMakeLists.txt Add missing test dependency. 2016-06-22 01:03:15 +00:00
TestRunner.sh
cxx-sections.data
lit.cfg Add a RenderScript language type 2016-06-09 21:57:40 +00:00
lit.site.cfg.in Replace hardcoded comment at 'lit.site.cfg.in' 2016-04-16 06:54:46 +00:00
make_test_dirs.pl