summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Skip extra copy from aggregate where it isn't necessary; ↵Eli Friedman2011-05-021-0/+20
| | | | | | rdar://problem/8139919 . This shouldn't make much of a difference at -O3, but should substantially reduce the number of generated memcpy's at -O0. llvm-svn: 130717
* Augment retain/release checker to not warn about tracked objects passed as ↵Ted Kremenek2011-05-022-2/+286
| | | | | | arguments to C++ constructors. This is a stop-gap measure for Objective-C++ code that uses smart pointers to manage reference counts. llvm-svn: 130711
* Implements strncasecmp() checker and simplifies some of the logic around ↵Lenny Maiorani2011-05-021-0/+106
| | | | | | creating substrings if necessary and calling the appropriate StringRef::compare/compare_lower(). llvm-svn: 130708
* Add a warning for when reinterpret_cast leads to undefined behavior, patch ↵Argyrios Kyrtzidis2011-05-021-1/+153
| | | | | | by Richard Trieu! llvm-svn: 130703
* More rule enforcement of zero bitfields for ms_struct.Fariborz Jahanian2011-05-021-0/+8
| | | | llvm-svn: 130696
* lib/Frontend/InitHeaderSearch.cpp: Tweak AddPath() to accept "/foo/bar" (not ↵NAKAMURA Takumi2011-05-021-1/+1
| | | | | | | "X:\foo\bar") with -isysroot. test/PCH/reloc.c can pass. FIXME: We should consider better isysroot scheme on Win32 hosts. llvm-svn: 130683
* test/CodeGenCXX/vtable-debug-info.cpp: It does not crash on mingw.NAKAMURA Takumi2011-05-021-3/+4
| | | | | FIXME: It would crash with -integrated-as. Implement -g on MCCOFF. llvm-svn: 130682
* test/CodeGenCXX/debug-info-namespace.cpp: Add explicit -fverbose-asm to cc1 ↵NAKAMURA Takumi2011-05-021-2/+1
| | | | | | | | to let cygming pass. This test seeks a verbose comment in output. By default, "-integrated-as" sets verbose-asm. Cygming is not ready for -integrated-as yet. llvm-svn: 130681
* Store a parameter index and function prototype depth in everyJohn McCall2011-05-011-0/+44
| | | | | | | | | | parameter node and use this to correctly mangle parameter references in function template signatures. A follow-up patch will improve the storage usage of these fields; here I've just done the lazy thing. llvm-svn: 130669
* Add r130624 back now that ELF has been fixed to work with -fno-dwarf2-cfi-asm.Rafael Espindola2011-05-011-2/+1
| | | | llvm-svn: 130659
* Based on the new information in the AST provided by r130628, writeChandler Carruth2011-05-012-11/+11
| | | | | | | | | | | 3 lines of code and improve a bunch of information in the libclang view of the code. Updates the two tests that exercise this with the new data, checking that each new source location actually points back to the declared template parameter. llvm-svn: 130656
* Fully implement delegating constructors!Alexis Hunt2011-05-012-0/+84
| | | | | | | | | | As far as I know, this implementation is complete but might be missing a few optimizations. Exceptions and virtual bases are handled correctly. Because I'm an optimist, the web page has appropriately been updated. If I'm wrong, feel free to downgrade its support categories. llvm-svn: 130642
* Add a triple to this test, otherwise it fails under MSVC because wchar_t is ↵Francois Pichet2011-05-011-1/+1
| | | | | | unsigned with the i686-pc-win32 triple. llvm-svn: 130636
* Revert the previous patch while I figure out how to make llvm-gccRafael Espindola2011-04-301-1/+2
| | | | | | less agressive about disabling cfi on linux :-( llvm-svn: 130627
* Update for cfi.Rafael Espindola2011-04-301-2/+1
| | | | llvm-svn: 130624
* PR9792: Make sure to use the right definition of wchar_t when the defaultEli Friedman2011-04-301-0/+6
| | | | | | wchar_t is an unsigned type. llvm-svn: 130620
* Some small improvements to the builtin (-ffreestanding) stdint.h; inEli Friedman2011-04-301-1/+7
| | | | | | particular, make sure to handle WCHAR_MIN correctly. llvm-svn: 130618
* Pass -fno-dwarf2-cfi-asm and use FileCheck.Rafael Espindola2011-04-301-2/+8
| | | | llvm-svn: 130617
* When comparing parameters of reference-to-qualified type duringDouglas Gregor2011-04-301-0/+11
| | | | | | | | | partial ordering of function templates, use a simple superset relationship rather than the convertibility-implying isMoreQualifiedThan/compatibilyIncludes relationship. Fixes partial ordering between references and address-space-qualified references. llvm-svn: 130612
* Make type-traits reflect that Clang's vectors act like scalar types.Chandler Carruth2011-04-302-0/+13
| | | | llvm-svn: 130606
* Switch the type-trait like APIs on the AST to only check for incompleteChandler Carruth2011-04-301-2/+2
| | | | | | | | | | | types after looking through arrays. Arrays with an unknown bound seem to be specifically allowed in the library type traits in C++0x, and GCC's builtin __is_trivial returns 'true' for the type 'int[]'. Now Clang agrees with GCC about __is_trivial here. Also hardens these methods against dependent types by just returning false. llvm-svn: 130605
* Move the SelfInit checker to the 'cocoa.experimental' package.Ted Kremenek2011-04-301-1/+1
| | | | llvm-svn: 130598
* Adjust test/Analysis/retain-release.m to also test the retain/release ↵Ted Kremenek2011-04-291-7/+8
| | | | | | checker in Objective-C++ mode. llvm-svn: 130559
* block variables on lhs need be ir-gen'ed after theFariborz Jahanian2011-04-291-0/+17
| | | | | | | | rhs when its 'forwarding' pointer may be modified in rhs evaluation as result of call to Block_copy. // rdar://9309454 llvm-svn: 130545
* Disable -Wnon-pod-memset for now while I try to reduce the falseChandler Carruth2011-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | positives still further. The plan is to: 1) Create a more targeted warning for memset of memory pointing at a type with virtual methods or bases where a vptr would be overwritten. 2) Consider turning the above warning back on by default. 3) Evaluate whether any false positives in the existing warning can be detected and white listed in the warning implementation. 4) If #3 lowers the noise floor enough, enable the full warning in -Wall or -Wextra. Comments or suggestions welcome. Even more welcome are specific test cases which trigger the warning and shouldn't. llvm-svn: 130538
* Change -Wparentheses to not imply -Widiomatic-parentheses. Users rarely ↵Ted Kremenek2011-04-291-2/+2
| | | | | | want to see these warnings, and often explicitly pass -Wparentheses. llvm-svn: 130535
* Relax the non-POD memset warning to use the less restrictive C++11Chandler Carruth2011-04-291-0/+9
| | | | | | | | | | | definition of POD. Specifically, this allows certain non-aggregate types due to their data members being private. The representation of C++11 POD testing is pretty gross. Any suggestions for improvements there are welcome. Especially the name 'isCXX11PODType()' seems truly unfortunate. llvm-svn: 130492
* r130381 follow up: accept __uuidof expression for template argument reference.Francois Pichet2011-04-291-0/+3
| | | | llvm-svn: 130491
* Add a decl update when a static data member of a class template is ↵Sebastian Redl2011-04-291-0/+20
| | | | | | instantiated in a different PCH than its containing class. Otherwise we get double definition errors. Fixes a Boost.MPL problem that affects Boost.Accumulators and probably a lot more of Boost. llvm-svn: 130488
* Use -emit-llvm-only as suggested by Argyrios.Sebastian Redl2011-04-291-2/+2
| | | | llvm-svn: 130486
* OopsDouglas Gregor2011-04-291-1/+1
| | | | llvm-svn: 130469
* libstdc++ 4.2 also uses __is_same as a struct name, which conflicts with our ↵Douglas Gregor2011-04-291-0/+7
| | | | | | new type trait __is_same llvm-svn: 130468
* Cut down unnecessary zero'ing when value-initializing arrays of C++ objects.Argyrios Kyrtzidis2011-04-281-0/+14
| | | | | | | -C++ objects with user-declared constructor don't need zero'ing. -We can zero-initialize arrays of C++ objects in "bulk" now, in which case don't zero-initialize each object again. llvm-svn: 130453
* ms_struct patch for initialization and field access irgen.Fariborz Jahanian2011-04-281-0/+68
| | | | | | // rdar://8823265 - wip. llvm-svn: 130451
* Driver/Darwin/ld: Set the deployment target following the version information inDaniel Dunbar2011-04-281-2/+2
| | | | | | the tool chain, instead of based on the translated arguments. llvm-svn: 130440
* tests: Tweak test to not write to the same temporary twice, in the hopes of ↵Daniel Dunbar2011-04-281-4/+5
| | | | | | avoiding sporadic win32 failures about renaming a temporary. llvm-svn: 130439
* When value-initializing the elements of an array not not included in the ↵Argyrios Kyrtzidis2011-04-281-0/+41
| | | | | | | | | | initializer make sure that a non-trivial C++ constructor gets called. Fixes rdar://9347552 & http://llvm.org/PR9801 llvm-svn: 130421
* Don't waste memory if the initializer expression is empty.Argyrios Kyrtzidis2011-04-281-0/+2
| | | | llvm-svn: 130420
* When determining whether two types are reference-compatible, checkDouglas Gregor2011-04-281-0/+19
| | | | | | | | non-CVR qualifiers as well as CVR qualifiers. For example, don't allow a reference to an integer in address space 1 to bind to an integer in address space 2. llvm-svn: 130411
* libstdc++ 4.4 uses __is_signed as an identifier, while Clang treats itDouglas Gregor2011-04-281-0/+9
| | | | | | | | | | | | | as a keyword for the __is_signed type trait. Cope with this conflict via some hackish recovery: if we see a declaration of the form static const bool __is_signed then we stop treating __is_signed as a keyword and instead treat it as an identifier. It's ugly, but it's better than making the __is_signed type trait conditional on some language flag. Fixes PR9804. llvm-svn: 130399
* Implements strcasecmp() checker in Static Analyzer.Lenny Maiorani2011-04-281-0/+84
| | | | llvm-svn: 130398
* Support &__uuidof(type) as a non type template argument.Francois Pichet2011-04-281-0/+7
| | | | | | | | | | | | | | | This idiom is used everywhere in MFC/COM code and as such this patch removes hundreds of errors when parsing MFC code with clang. Example: template <class T, const GUID* g = &__uuidof(T)> class ComTemplate { }; typedef ComTemplate<struct_with_uuid, &__uuidof(struct_with_uuid)> COM_TYPE; Of course this is just parsing support. Trying to use this in CodeGen will generate: error: cannot yet mangle expression type CXXUuidofExpr llvm-svn: 130381
* Implement the mangling for non-ADL call expressions that we justJohn McCall2011-04-281-0/+16
| | | | | | worked out. llvm-svn: 130376
* When block-capturing a variable with a non-trivial destructor,John McCall2011-04-281-0/+17
| | | | | | | | | | make sure to mark the destructor. This normally isn't required, because the destructor should have been marked as part of the declaration of the local, but it's necessary when the variable is a parameter because it's the call sites that are responsible for those destructors. llvm-svn: 130372
* Because of r130359 this test no longer fail on Windows.Francois Pichet2011-04-281-3/+0
| | | | llvm-svn: 130370
* Upgrade Microsoft's __int8, __int16, __int32 and __int64 types from builtin ↵Francois Pichet2011-04-282-5/+3
| | | | | | | | | | | | | | defines to real types. Otherwise statements like: __int64 var = __int64(0); would be expanded to: long long var = long long(0); and fail to compile. llvm-svn: 130369
* Convert assertion in memset checking to a runtime check (because real code ↵Ted Kremenek2011-04-281-0/+6
| | | | | | may provide a deviant definition of memset). llvm-svn: 130368
* Removed test that depended on ast-testJohn Wiegley2011-04-281-28/+0
| | | | llvm-svn: 130367
* Parsing/AST support for Structured Exception HandlingJohn Wiegley2011-04-283-0/+257
| | | | | | | | Patch authored by Sohail Somani. Provide parsing and AST support for Windows structured exception handling. llvm-svn: 130366
* More cleanup of template argument deduction and its handling ofDouglas Gregor2011-04-281-0/+27
| | | | | | | non-CVR qualifiers. We can now properly match address-space--qualified references during template argument deduction. llvm-svn: 130365
OpenPOWER on IntegriCloud