summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/builtin-object-size.c
Commit message (Collapse)AuthorAgeFilesLines
* Don't let EvaluationModes dictate whether an invalid base is OKGeorge Burgess IV2017-02-101-0/+15
| | | | | | | | | | | | What we want to actually control this behavior is something more local than an EvalutationMode. Please see the linked revision for more discussion on why/etc. This fixes PR31843. Differential Revision: https://reviews.llvm.org/D29469 llvm-svn: 294800
* [ExprConstant] Fix PR28314 - crash while evluating objectsize.George Burgess IV2016-06-271-0/+24
| | | | | | | | | | | | | | | | | | | | | 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
* Fix the argument index error of __builtin___memccpy_chkSteven Wu2014-09-241-0/+9
| | | | | | | memccpy_check should have source and dest size at arg 3 and 4 rdar://18431336 llvm-svn: 218367
* Attempt to fix Sema/builtin-object-size.c after r218258Hans Wennborg2014-09-231-1/+1
| | | | | | The type of size_t varies between targets. llvm-svn: 218288
* Fix evatuated value of __builtin_object_size according to itsFariborz Jahanian2014-09-221-0/+17
| | | | | | | 'type' argument when it cannot be determined which objects ptr points to at compile time. rdar://18334276 llvm-svn: 218258
* Patch to check at compile time for overflow whenFariborz Jahanian2014-09-181-1/+1
| | | | | | | | __builtin___memcpy_chk and similar builtins are being used. Patch by Jacques Fortier (with added clang tests). rdar://11076881 llvm-svn: 218063
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-2/+2
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* Eliminate &&s in tests.Daniel Dunbar2009-11-081-1/+1
| | | | | | - 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious. llvm-svn: 86430
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-2/+2
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Append the test runs with '&&'.Argyrios Kyrtzidis2008-10-051-1/+1
| | | | llvm-svn: 57085
* Fix rdar://6252231 - cannot call vsnprintf with va_list on x86_64,Chris Lattner2008-09-281-0/+9
| | | | | | | | by decaying __builtin_va_list's type when forming builtins. On x86-64 (and other targets) __builtin_va_list is a typedef for an array. llvm-svn: 56768
* Add two test cases for builtins (mostly related to object sizeDaniel Dunbar2008-09-031-0/+19
builtins). llvm-svn: 55736
OpenPOWER on IntegriCloud