summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix a bug in the token caching for inline constructors in C++11, and improve ↵Sebastian Redl2011-09-302-0/+19
| | | | | | error recovery in both dialects. This should fix the GCC test suite failures as well. llvm-svn: 140847
* Add explicit attributes to mark functions as having had theirJohn McCall2011-09-302-0/+34
| | | | | | | | | | | CoreFoundation object-transfer properties audited, and add a #pragma to cause them to be automatically applied to functions in a particular span of code. This has to be implemented largely in the preprocessor because of the requirement that the region be entirely contained in a single file; that's hard to impose from the parser without registering for a ton of callbacks. llvm-svn: 140846
* Fix crash when analyzing C++ code involving constant enums and switch ↵Ted Kremenek2011-09-301-0/+26
| | | | | | statements (<rdar://problem/10202899>). llvm-svn: 140844
* [analyzer] Fix a bug in RetainReleaseChecker diagnostics. It gives more ↵Anna Zaks2011-09-301-1/+1
| | | | | | precise error message on the modified test case (and prevents duplicate diagnostics when we purge at block granularity). llvm-svn: 140840
* [analyzer] Add -analyzer-purge option which can take on multiple values, ↵Anna Zaks2011-09-301-1/+1
| | | | | | remove -analyzer-purge=none. (Small refactor as well: move the work of constructing AnalysisManager from the callers to the class itself.) llvm-svn: 140838
* Some fixes for MS-style asm parsing: specifically, add some error checking, ↵Eli Friedman2011-09-302-9/+25
| | | | | | and handle asm comments using semicolons correctly. (The comments are actually surprisingly tricky.) llvm-svn: 140837
* constexpr functions are implicitly const. More tests to follow.Richard Smith2011-09-303-4/+10
| | | | llvm-svn: 140831
* Suggest adding 'constexpr' if the GNU extension for in-class initializers ↵Richard Smith2011-09-302-3/+3
| | | | | | for static const float members is used in C++11 mode. llvm-svn: 140828
* Mark the ExtWarn for in-class initialization of static const float members ↵Richard Smith2011-09-295-11/+9
| | | | | | as a GNU extension. Don't extend the scope of this extension to all literal types in C++0x mode. llvm-svn: 140820
* PR11040: CheckICE should not allow an lvalue bitcast as part of an integer ↵Eli Friedman2011-09-291-1/+3
| | | | | | constant expression. llvm-svn: 140812
* In C++0x, static const volatile data members cannot be initialized in-class.Richard Smith2011-09-292-0/+29
| | | | llvm-svn: 140809
* PR11000: Fix crash on invalid.Richard Smith2011-09-291-0/+9
| | | | llvm-svn: 140802
* constexpr: semantic checking for constexpr variables.Richard Smith2011-09-297-15/+121
| | | | | | We had an extension which allowed const static class members of floating-point type to have in-class initializers, 'as a C++0x extension'. However, C++0x does not allow this. The extension has been kept, and extended to all literal types in C++0x mode (with a fixit to add the 'constexpr' specifier). llvm-svn: 140801
* c - Enumerators may inherit the deprecated/unavailable Fariborz Jahanian2011-09-293-3/+24
| | | | | | | attributes from the enumeration type. // rdar://10201690 llvm-svn: 140800
* Add support for alignment-specifiers in C1X and C++11, removePeter Collingbourne2011-09-296-12/+37
| | | | | | | support for the C++0x draft [[align]] attribute and add the C1X standard header file stdalign.h llvm-svn: 140796
* Add a warning group for warnings about using C1X features as extensionsPeter Collingbourne2011-09-291-3/+1
| | | | llvm-svn: 140795
* Add support for parsing an attribute-specifier-seq containing multiplePeter Collingbourne2011-09-291-0/+1
| | | | | | attribute-specifiers llvm-svn: 140794
* Add support for parsing the optional attribute-specifier-seq at thePeter Collingbourne2011-09-291-0/+2
| | | | | | end of a decl-specifier-seq llvm-svn: 140793
* Add an ns_bridged attribute, used to specify that a John McCall2011-09-291-0/+15
| | | | | | | | | | | | | | pointer to the annotated struct type can be used as an Objective-C object pointer. If an argument is given, the type is actually "toll-free bridged" to the specific type named there, rather than just to 'id'. For now, we cannot rely on all types being so annotated, and we'll always have to have exceptions for things like CFTypeRef (aka const void*), but this is clearly a good foundation for improving toolage in this area. llvm-svn: 140779
* Like IBOutletCollection, it only makes sense to apply the IBOutlet ↵Ted Kremenek2011-09-292-4/+5
| | | | | | annotation to Objective-C object types. Fixes <rdar://problem/10142685>. llvm-svn: 140778
* Do not warn about empty format strings when there are no data arguments. ↵Ted Kremenek2011-09-291-1/+6
| | | | | | Fixes <rdar://problem/9473155>. llvm-svn: 140777
* Basic/Diagnostics: Rewrite DiagnosticIDs::getDiagnosticLevel completely to ↵Daniel Dunbar2011-09-294-7/+7
| | | | | | | | be straighter line code, use the new DiagnosticMappingInfo flags, and eliminate the odd MAP_WARNING_NO_WERROR and friend mappings. - This fixes a host of obscure bugs with regards to how warning mapping options composed with one another, and I believe makes the code substantially easier to read and reason about. llvm-svn: 140770
* tests: Add some more tests for warning mappings.Daniel Dunbar2011-09-294-0/+36
| | | | llvm-svn: 140764
* Basic/Diagnostics: Add an isDefaultMappingAsError method, and switch ↵Daniel Dunbar2011-09-291-0/+8
| | | | | | | | TextDiagnosticPrinter to use that instead of extracting the current mapping via getDiagnosticLevel, which fixes one class of corner cases w.r.t. printing the "-Werror" diagnostic option marker. - The TextDiagnosticPrinter code is still fragile as it is just "reverse engineering" what the diagnostic engine is doing. Not my current priority to fix though. llvm-svn: 140752
* Introduce an opt-in warning when a module is being implicitly builtDouglas Gregor2011-09-291-0/+5
| | | | | | from sources. llvm-svn: 140746
* [driver] Add basic support for escaping XML characters in CC_LOG_DIAGNOSTICSChad Rosier2011-09-281-1/+1
| | | | | | | strings. rdar://9696709 llvm-svn: 140732
* objc arc: Diagnose block pointer type mismatch whenFariborz Jahanian2011-09-281-0/+20
| | | | | | | | some arguments types are ns_consumed and some otherwise matching types are not. This is objc side of // rdar://10187884 llvm-svn: 140729
* objc++ arc: Diagnose block pointer type mismatch whenFariborz Jahanian2011-09-281-0/+20
| | | | | | | | some arguments types are ns_consumed and some otherwise matching types are not. This fixes the objc++ side only *auch*. // rdar://10187884 llvm-svn: 140717
* Tweak -Wobjc-missing-super-calls to not warning about missing [super ↵Ted Kremenek2011-09-281-2/+10
| | | | | | dealloc] when in GC-only mode, and to not warning about missing [super finalize] when not using GC. llvm-svn: 140713
* Generate tests for all of the x86 SIMD instruction feature setChandler Carruth2011-09-281-0/+244
| | | | | | | | | | | | | | predefines based on the output of GCC as well as the CPU predefines. Invert tests for __AVX__, Clang's AVX feature is hard coded off still. Switch Atom from 'SSE3' to 'SSSE3'. This matches GCC's behavior, Intel's documentation, and ICC's documentation (such as I could dig up). Switch Athlon and Geode to enable 3dnowa rather than just 3dnow and nothing (resp.). llvm-svn: 140692
* Add a little banner to this test. This lets my scripts more easilyChandler Carruth2011-09-281-0/+4
| | | | | | | | | | automate the process of updating and generating these tests. If anyone is really interested, I can check my scripts for generating this test in, but its a horrible pile of shell... Not sure its really worth it. llvm-svn: 140691
* Fix a think-o on my part that got enshrined in a FIXME by setting up theChandler Carruth2011-09-281-6/+3
| | | | | | __tune_...__ define as well. llvm-svn: 140690
* Teach Clang to reject 32-bit only CPUs when compiling in 64-bit mode.Chandler Carruth2011-09-281-0/+206
| | | | | | Add 64-bit preprocessor macro tests. llvm-svn: 140688
* Begin fixing Clang's predefined macros for various architectures. ThisChandler Carruth2011-09-282-12/+415
| | | | | | | | | | | | | | | | is *very* much a WIP that I'll be refining over the next several commits, but I need to get this checkpoint in place for sanity. This also adds a much more comprehensive test for architecture macros, which is roughly generated by inspecting the behavior of a trunk build of GCC. It still requires some massaging, but eventually I'll even check in the script that generates these so that others can use it to append more tests for more architectures, etc. Next up is a bunch of simplification of the Targets.cpp code, followed by a lot more test cases once we can reject invalid architectures. llvm-svn: 140673
* PR11002: Make sure we emit sentinel warnings with a valid source location. ↵Eli Friedman2011-09-271-1/+6
| | | | | | (Ideally, we want to use the location returned by getLocForEndOfToken, but that is not always successful.) llvm-svn: 140658
* Include prefix with default synthesized ivars.Ted Kremenek2011-09-276-28/+26
| | | | llvm-svn: 140657
* Only print _Bool as 'bool' when 'bool' is defined as an object-likeDouglas Gregor2011-09-271-2/+6
| | | | | | macro whose only replacement token is '_Bool'. llvm-svn: 140656
* Remove the egregious hack that made Objective-C++ ARC work with olderDouglas Gregor2011-09-271-11/+0
| | | | | | | versions of libc++. Newer versions of libc++ know how to deal with ARC properly. Fixes <rdar://problem/10062179>. llvm-svn: 140651
* When 'bool' is not a built-in type but is defined as a macro, printDouglas Gregor2011-09-272-4/+6
| | | | | | | 'bool' rather than '_Bool' within types, to make things a bit more readable. Fixes <rdar://problem/10063263>. llvm-svn: 140650
* objcetive-c-arc: When overriding a method, its ns_consumed patameterFariborz Jahanian2011-09-271-0/+19
| | | | | | | | attribute must match its overriden method. Same also for ns_returns_retained/not_retained on the result type. This is one half of // rdar://10187884 llvm-svn: 140649
* Fix a crash in MallocOverflowSecurityChecker. Patch by Lei Zhang.Anna Zaks2011-09-271-0/+11
| | | | llvm-svn: 140648
* [analyzer] Remove target triple from the malloc overflow test.Anna Zaks2011-09-271-3/+2
| | | | llvm-svn: 140635
* Some changes to improve compatibility for MSVC-style C++ struct layout. ↵Eli Friedman2011-09-271-0/+176
| | | | | | Patch from r4start at gmail.com (with some minor modifications by me). llvm-svn: 140623
* Move test, so it actually tests what it is supposed to (given that we don't ↵Eli Friedman2011-09-272-8/+8
| | | | | | have an AST verifier). llvm-svn: 140620
* [libclang] Expose array size and element type, patch by Vinay Sajip!Argyrios Kyrtzidis2011-09-271-1/+2
| | | | llvm-svn: 140614
* When parsing a character literal, extract the characters from theDouglas Gregor2011-09-271-0/+4
| | | | | | | | buffer as an 'unsigned char', so that integer promotion doesn't sign-extend character values > 127 into oblivion. Fixes <rdar://problem/10188919>. llvm-svn: 140608
* Revert r139989 and r140031, which implemented the Objective-C typeDouglas Gregor2011-09-271-44/+0
| | | | | | | | | system change in <rdar://problem/10109725> that allows conversion from 'self' in class methods to the root of the class's hierarchy. This conversion rule is a hack that has non-trivial repurcussions (particularly with overload resolution). llvm-svn: 140605
* Revert r140589. It was causing failures during llvm compilation:Bill Wendling2011-09-271-8/+4
| | | | | | | | | | | | | | llvm[1]: Compiling CommandLine.cpp for Debug+Asserts build if /Users/void/llvm/llvm-opt.obj/Release+Asserts/bin/clang++ -I/Users/void/llvm/llvm.obj/include -I/Users/void/llvm/llvm.obj/lib/Support -I/Users/void/llvm/llvm.src/include -I/Users/void/llvm/llvm.src/lib/Support -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -g -fno-exceptions -fno-common -Woverloaded-virtual -Wcast-qual -m64 -Wall -W -Wno-unused-parameter -Wwrite-strings -c -MMD -MP -MF "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d.tmp" -MT "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.o" -MT "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d" /Users/void/llvm/llvm.src/lib/Support/CommandLine.cpp -o /Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.o ; \ then /bin/mv -f "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d.tmp" "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d"; else /bin/rm "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d.tmp"; exit 1; fi In file included from /Users/void/llvm/llvm.src/lib/Support/CommandLine.cpp:25: /Users/void/llvm/llvm.src/include/llvm/Support/system_error.h:690:14: error: unknown type name 'make_error_condition'; did you mean 'error_condition'? {*this = make_error_condition(_e);} ^~~~~~~~~~~~~~~~~~~~ error_condition ... llvm-svn: 140599
* PR11009: Fix a FIXME which was leading to an assertion failure with rvalue ↵Eli Friedman2011-09-271-0/+8
| | | | | | references. llvm-svn: 140594
* Add typo correction for the type name in C++ "new" statementsKaelyn Uhrain2011-09-271-4/+8
| | | | llvm-svn: 140589
OpenPOWER on IntegriCloud