summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* rewrite-includes: Rewrite __has_include(_next) to get rid of a host dependency.Benjamin Kramer2013-04-163-0/+41
| | | | | | | | | | | | | | This broke e.g. compiling a crash report from a glibc system on Darwin. Sadly, the implementation had to game the lexer a lot as we're not using a real preprocessor here. It also doesn't handle special cases like arbitrary macros in __has_include, but since this macro isn't common outside of clang's headers we can get away with that. Fixes PR14422. Differential Revision: http://llvm-reviews.chandlerc.com/D594 llvm-svn: 179616
* Parser support for #pragma clang __debug capturedTareq A. Siraj2013-04-162-0/+27
| | | | | | | | | | | | | | | This patch implements parsing ‘#pragma clang __debug’ as a first step for implementing captured statements. Captured statements are a mechanism for doing outlining in the AST. see http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-January/027540.html. Currently returns StmtEmpty Author: Andy Zhang <andy.zhang@intel.com> Differential Revision: http://llvm-reviews.chandlerc.com/D369 llvm-svn: 179614
* [Modules] Convert module specific -fno-modules-autolink into -fno-autolink.Daniel Dunbar2013-04-164-13/+11
| | | | | | | | | - There is no reason to have a modules specific flag for disabling autolinking. Instead, convert the existing flag into -fno-autolink (which should cover other autolinking code generation paths like #pragmas if and when we support them). llvm-svn: 179612
* modify test to try to make buildbot happy.Fariborz Jahanian2013-04-161-2/+1
| | | | llvm-svn: 179606
* Remove setjmp.h header file from Sema/return.c test and include necessaryJyotsna Verma2013-04-161-3/+7
| | | | | | declarations explicitly in the test. llvm-svn: 179604
* Fix PR4296: Add parser detection/error recovery for nested functions, from ↵Douglas Gregor2013-04-161-0/+11
| | | | | | Serve Pavlov! llvm-svn: 179603
* Use -emit-llvm for the following tests to stop them from failing for Hexagon:Jyotsna Verma2013-04-163-4/+4
| | | | | | | | CodeGenCXX/vtable-debug-info.cpp Driver/objc++-cpp-output.mm Driver/objc-cpp-output.m llvm-svn: 179602
* Fix handling of atomic shift operations, from Serge Pavlov.Douglas Gregor2013-04-161-0/+47
| | | | llvm-svn: 179600
* Objective-C IRGen. Use llvm::WeakVHFariborz Jahanian2013-04-161-0/+44
| | | | | | | | | | for caching couple of global symbols used for generation of CF/NS string meta-data so they are not released prematuely in certain corner cases. // rdar:// 13598026. Reviewed by John M. llvm-svn: 179599
* Suppress unused warning on static inline function template specializations.Rafael Espindola2013-04-161-0/+21
| | | | | | Patch by Halfdan Ingvarsson! llvm-svn: 179598
* Add support for sparcv9 targets.Jakob Stoklund Olesen2013-04-162-0/+6
| | | | | | | | | | | | The SPARC v8 and SPARC v8 architectures are very similar, so use a base class to share most information between them. Include operating systems with known SPARC v9 ports. Also fix two issues with the SPARC v8 data layout string: SPARC v8 is a big endian target with a 64-bit aligned stack. llvm-svn: 179596
* Basic support for Microsoft property declarations andJohn McCall2013-04-163-1/+154
| | | | | | | | references thereto. Patch by Tong Shen! llvm-svn: 179585
* Correctly propagate the storage class to function template instantiations.Rafael Espindola2013-04-161-0/+12
| | | | | | | This fixes pr15753. This is another case of the fuzzy definition of the "as written" storage class of an instantiation. llvm-svn: 179581
* [analyzer] Improve the malloc checker stack hint messageAnna Zaks2013-04-162-223/+451
| | | | llvm-svn: 179580
* [analyzer] Do not crash when processing binary "?:" in C++Anna Zaks2013-04-151-0/+17
| | | | | | | | | | | | | | | | | | | | | | When computing the value of ?: expression, we rely on the last expression in the previous basic block to be the resulting value of the expression. This is not the case for binary "?:" operator (GNU extension) in C++. As the last basic block has the expression for the condition subexpression, which is an R-value, whereas the true subexpression is the L-value. Note the operator evaluation just happens to work in C since the true subexpression is an R-value (like the condition subexpression). CFG is the same in C and C++ case, but the AST nodes are different, which the LValue to Rvalue conversion happening after the BinaryConditionalOperator evaluation. Changed the logic to only use the last expression from the predecessor only if it matches either true or false subexpression. Note, the logic needed fortification anyway: L and R were passed but not even used by the function. Also, change the conjureSymbolVal to correctly compute the type, when the expression is an LG-value. llvm-svn: 179574
* [analyzer] Add pretty printing to CXXBaseObjectRegion.Anna Zaks2013-04-151-0/+118
| | | | llvm-svn: 179573
* [analyzer] Address code review for r179395Anna Zaks2013-04-151-0/+121
| | | | | | Mostly refactoring + handle the nested fields by printing the innermost field only. llvm-svn: 179572
* [analyzer] Add more specialized error messages for corner cases as per ↵Anna Zaks2013-04-151-3/+3
| | | | | | Jordan's code review for r179396 llvm-svn: 179571
* [analyzer] Don't assert on a temporary of pointer-to-member type.Jordan Rose2013-04-151-0/+37
| | | | | | | | | | While we don't do anything intelligent with pointers-to-members today, it's perfectly legal to need a temporary of pointer-to-member type to, say, pass by const reference. Tweak an assertion to allow this. PR15742 and PR15747 llvm-svn: 179563
* [analyzer] Re-enable using global regions as a symbolic base.Jordan Rose2013-04-153-3/+143
| | | | | | | | | | | | | | | | Now that we're invalidating global regions properly, we want to continue taking advantage of a particular optimization: if all global regions are invalidated together, we can represent the bindings of each region with a "derived region value" symbol. Essentially, this lazily links each global region with a single symbol created at invalidation time, rather than binding each region with a new symbolic value. We used to do this, but haven't been for a while; the previous commit re-enabled this code path, and this handles the fallout. <rdar://problem/13464044> llvm-svn: 179554
* [analyzer] Properly invalidate global regions on opaque function calls.Jordan Rose2013-04-151-7/+17
| | | | | | | | | | | | | | | | | | | | This fixes a regression where a call to a function we can't reason about would not actually invalidate global regions that had explicit bindings. void test_that_now_works() { globalInt = 42; clang_analyzer_eval(globalInt == 42); // expected-warning{{TRUE}} invalidateGlobals(); clang_analyzer_eval(globalInt == 42); // expected-warning{{UNKNOWN}} } This has probably been around since the initial "cluster" refactoring of RegionStore, if not longer. <rdar://problem/13464044> llvm-svn: 179553
* [analyzer] Tests: move system functions into system header simulator files.Jordan Rose2013-04-153-18/+8
| | | | | | | | | | Some checkers ascribe different behavior to functions declared in system headers, so when working with standard library functions it's probably best to always have them in a standard location. Test change only (no functionality change), but necessary for the next commit. llvm-svn: 179552
* Revert "Speed-up ObjCMethodDecl::getOverriddenMethods()."Argyrios Kyrtzidis2013-04-151-0/+22
| | | | | | | | | | | This reverts commit r179436. Due to caching, it was possible that we could miss overridden methods that were introduced by categories later on. Along with reverting the commit I also included a test case that would have caught this. llvm-svn: 179547
* Remove XFAIL now that the test is standalone.Rafael Espindola2013-04-151-1/+0
| | | | llvm-svn: 179538
* [PCH/test] Make test/PCH/cxx-typeid.cpp self-contained by including the ↵Argyrios Kyrtzidis2013-04-152-4/+45
| | | | | | | | relevant standard library declarations instead of depending on a system header inclusion. llvm-svn: 179537
* Local thread_local variables are implicitly 'static'. (This doesn't apply to ↵Richard Smith2013-04-152-5/+26
| | | | | | _Thread_local nor __thread.) llvm-svn: 179517
* Properly check for a constant initializer for a thread-local variable.Richard Smith2013-04-151-0/+2
| | | | llvm-svn: 179516
* Add triple to another test.Richard Smith2013-04-151-1/+1
| | | | llvm-svn: 179515
* Add triples to these tests since they're now using TLS, which isn't ↵Richard Smith2013-04-152-3/+3
| | | | | | available on all targets. llvm-svn: 179514
* Add a new flag -vectorize-slp-aggressive to enable Hals BB vectorizer.Nadav Rotem2013-04-151-0/+7
| | | | llvm-svn: 179507
* Rename the slp-vectorizer clang/llvm flags. No functionality change.Nadav Rotem2013-04-151-2/+2
| | | | llvm-svn: 179506
* CodeGen support for function-local static thread_local variables withRichard Smith2013-04-142-0/+62
| | | | | | | | | non-constant constructors or non-trivial destructors. Plus bugfixes for thread_local references bound to temporaries (the temporaries themselves are lifetime-extended to become thread_local), and the corresponding case for std::initializer_list. llvm-svn: 179496
* Diagnose if a __thread or _Thread_local variable has a non-constant initializerRichard Smith2013-04-141-2/+27
| | | | | | or non-trivial destructor. llvm-svn: 179491
* [Mips] Support -mmicromips / -mno-micromips command line options.Simon Atanasyan2013-04-142-0/+22
| | | | llvm-svn: 179489
* [Mips] Follow-up to r179481. Consider "single-float" as a separateSimon Atanasyan2013-04-141-0/+6
| | | | | | independent of float ABI feature in the MipsTargetInfoBase class. llvm-svn: 179486
* Add driver support for fedora 18 on ARM.Rafael Espindola2013-04-147-0/+16
| | | | llvm-svn: 179484
* Handle incompatible redeclarations of library builtins better.John McCall2013-04-141-0/+20
| | | | | | | | | Invalid redeclarations of valid explicit declarations shouldn't take the same path as redeclarations of implicit declarations, and invalid local extern declarations shouldn't foul things up for everybody else. llvm-svn: 179482
* [Mips] Remove "single" from the list of valid MIPS float ABI names. AddSimon Atanasyan2013-04-141-2/+17
| | | | | | | | | two new options –msingle-float and –mdouble-float. These options can be used simultaneously with float ABI selection options (-mfloat-abi, -mhard-float, -msoft-float). They mark whether a floating-point coprocessor supports double-precision operations. llvm-svn: 179481
* Simplify test so that it is more portable.Rafael Espindola2013-04-131-5/+3
| | | | | | | I have checked that the test still fails when the "|| !P.isRegularFile()" from the original patch is removed. llvm-svn: 179464
* Annotate flavor of TLS variable (statically or dynamically initialized) onto ↵Richard Smith2013-04-135-4/+41
| | | | | | the AST. llvm-svn: 179447
* Give this test a triple so that its use of thread_local doesn't make it fail ↵Richard Smith2013-04-131-1/+1
| | | | | | on the MSVC bot. llvm-svn: 179432
* Don't replace an existing decl in the scope chains with itsJohn McCall2013-04-133-4/+13
| | | | | | | | | local-extern redeclaration; type refinements, default arguments, etc. must all be locally scoped. rdar://13535367 llvm-svn: 179430
* Headers: Don't try to use RSIZE_MAX unless we are freestanding.Daniel Dunbar2013-04-121-1/+9
| | | | | | - We don't want to depend on the platforms stdint.h. llvm-svn: 179429
* [analyzer] Enable NewDelete checker if NewDeleteLeaks checker is enabled.Anton Yartsev2013-04-121-1/+1
| | | | llvm-svn: 179428
* Headers: Add support for ISO9899:2011 rsize_t.Daniel Dunbar2013-04-121-0/+5
| | | | llvm-svn: 179427
* NewDeleteLeaks is a subchecker of NewDelete checker; it is tested in ↵Anton Yartsev2013-04-121-28/+0
| | | | | | NewDelete-checker-test.cpp llvm-svn: 179426
* Parsing support for thread_local and _Thread_local. We give them the sameRichard Smith2013-04-123-17/+72
| | | | | | semantics as __thread for now. llvm-svn: 179424
* tl;dr: Teach Clang to work around g++ changing its workaround to glibc'sRichard Smith2013-04-121-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | implementation of C99's attempt to control the C++ standard. *sigh* The C99 standard says that certain macros in <stdint.h>, such as SIZE_MAX, should not be defined when the header is included in C++ mode, unless __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS are defined. The C++11 standard says "Thanks, but no thanks" and C11 removed this rule, but various C library implementations (such as glibc) follow C99 anyway. g++ prior to 4.8 worked around the C99 / glibc behavior by defining __STDC_*_MACROS in <cstdint>, which was incorrect, because <stdint.h> is supposed to provide these macros too. g++ 4.8 works around it by defining __STDC_*_MACROS in its builtin <stdint.h> header. This change makes Clang act like g++ 4.8 in this regard: our <stdint.h> now countermands any attempt by the C library to implement the undesired C99 rules, by defining the __STDC_*_MACROS first. Unlike g++, we do this even in C++98 mode, since that was the intent of the C++ committee, matches the behavior required in C11, and matches our built-in implementation of <stdint.h>. llvm-svn: 179419
* [analyzer] Makes NewDeleteLeaks checker work independently from NewDelete.Anton Yartsev2013-04-121-0/+28
| | | | llvm-svn: 179410
* Define Neon intrinsics as "static inline" to avoid warning. rdar://13108414Bob Wilson2013-04-121-0/+12
| | | | | | | | | | | We had been defining Neon intrinsics as "static" with always_inline attributes. If you use them from an extern inline function, you get a warning, e.g.: static function 'vadd_u8' is used in an inline function with external linkage This change simply adds the inline keyword to avoid that warning. llvm-svn: 179406
OpenPOWER on IntegriCloud