summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Rename EmitStopPoint in CGDebugInfo to EmitLocation. "stop points" don'tEric Christopher2011-09-295-8/+10
| | | | | | exist anymore. llvm-svn: 140739
* Reorder functions in the file.Eric Christopher2011-09-291-31/+30
| | | | llvm-svn: 140738
* Call UpdateLineDirectiveRegion every time we want to emit a stopEric Christopher2011-09-294-6/+8
| | | | | | | point in the code. Ensures that we don't miss any places and the check is reasonably cheap. llvm-svn: 140737
* Update comment.Eric Christopher2011-09-291-1/+2
| | | | llvm-svn: 140736
* [driver] Add basic support for escaping XML characters in CC_LOG_DIAGNOSTICSChad Rosier2011-09-281-5/+30
| | | | | | | strings. rdar://9696709 llvm-svn: 140732
* objc arc: Diagnose block pointer type mismatch whenFariborz Jahanian2011-09-282-16/+29
| | | | | | | | some arguments types are ns_consumed and some otherwise matching types are not. This is objc side of // rdar://10187884 llvm-svn: 140729
* Check for empty predecessors for walking them.Ted Kremenek2011-09-281-1/+1
| | | | llvm-svn: 140725
* objc++ arc: Diagnose block pointer type mismatch whenFariborz Jahanian2011-09-281-0/+17
| | | | | | | | 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/+3
| | | | | | dealloc] when in GC-only mode, and to not warning about missing [super finalize] when not using GC. llvm-svn: 140713
* For __weak/__strong/etc. ownership attributes, don't macro expand them in ↵Argyrios Kyrtzidis2011-09-281-7/+11
| | | | | | diagnostics. llvm-svn: 140711
* Fix a typo spotted by Jonathan Sauer.Chandler Carruth2011-09-281-1/+1
| | | | llvm-svn: 140708
* Attempt to silence the GCC -Wreturn-type warning...Chandler Carruth2011-09-281-0/+1
| | | | llvm-svn: 140693
* Generate tests for all of the x86 SIMD instruction feature setChandler Carruth2011-09-281-4/+6
| | | | | | | | | | | | | | 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
* Fix a think-o on my part that got enshrined in a FIXME by setting up theChandler Carruth2011-09-281-1/+3
| | | | | | __tune_...__ define as well. llvm-svn: 140690
* Move some of the defines down to more natural locations, consolidatingChandler Carruth2011-09-281-10/+10
| | | | | | the target identifying macros at the top, including subtarget macros. llvm-svn: 140689
* Teach Clang to reject 32-bit only CPUs when compiling in 64-bit mode.Chandler Carruth2011-09-281-2/+59
| | | | | | Add 64-bit preprocessor macro tests. llvm-svn: 140688
* Simplify the control flow for predefined macro selection by usingChandler Carruth2011-09-281-27/+26
| | | | | | | | | fallthrough now that we're working with a switch. Also remove a dubious "feature" regarding k6 processors and 3dnow and leave a fixme... Not that anyone is likely to care about correct tuning for k6 processors with and w/o 3dnow... llvm-svn: 140687
* Switch the X86TargetInfo object from a string representation of theChandler Carruth2011-09-281-57/+179
| | | | | | | | | | | | | | | | | | selected CPU model to the enumeration. This parses the string representation once using a StringSwitch on SetCPU. It returns an error for strings which are not recognized (yay!). Finally it replaces ridiculous if-chains with switches that cover all enumerators. The last change required adding several missing entries to the features function. These were obvious on inspection. Yay for a pattern that gives warnings when we miss one. No new test cases yet, as I want to get the 64-bit errors working first. I'll then start fleshing out the testing more. Currently I'm primarily testing on Linux, but I'm hoping check whether there are interesting differences on darwin before long... llvm-svn: 140685
* Introduce an enumeration for the x86 CPUs recognized by Clang. I'veChandler Carruth2011-09-281-0/+124
| | | | | | | tried to give these nice doxyments, but if I've gotten any of my history wrong, please chime in. llvm-svn: 140684
* Clean up a bit of the uses of CPU in the TargetInfo classes. This makesChandler Carruth2011-09-281-11/+6
| | | | | | | | | | | | it an error if a CPU is provided for a target that doesn't implement logic handling CPU settings, to match the ABI settings. It also removes the CPU parameter from the getDefaultFeatures method. This parameter was always filled in with the same value as setCPU was called with, and at this point every single target implementation that referenced the CPU within this function has needed to store the CPU via setCPU anyways in order to implement other interface points. llvm-svn: 140683
* Driver: Fix two bad typos that were breaking the buildbots.Benjamin Kramer2011-09-282-3/+2
| | | | llvm-svn: 140682
* Begin fixing Clang's predefined macros for various architectures. ThisChandler Carruth2011-09-281-6/+101
| | | | | | | | | | | | | | | | 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
* Introduce Decl::getParentFunctionOrMethod which if the decl is defined insideArgyrios Kyrtzidis2011-09-281-5/+5
| | | | | | a function/method/block it returns the corresponding DeclContext, otherwise it returns null. llvm-svn: 140672
* [driver] If no OSX or iOS target has been specified and we're compiling for Chad Rosier2011-09-281-0/+6
| | | | | | | armv7, go ahead as assume we're targeting iOS. rdar://10147774 llvm-svn: 140668
* PR11002: Make sure we emit sentinel warnings with a valid source location. ↵Eli Friedman2011-09-271-4/+7
| | | | | | (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-271-3/+14
| | | | llvm-svn: 140657
* Only print _Bool as 'bool' when 'bool' is defined as an object-likeDouglas Gregor2011-09-278-59/+81
| | | | | | 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-70/+1
| | | | | | | 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-2714-75/+73
| | | | | | | '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-3/+30
| | | | | | | | 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/+2
| | | | llvm-svn: 140648
* Check for GCC paths that have the target triple in them. This is required ↵David Chisnall2011-09-273-47/+54
| | | | | | for a lot of cross-compile toolchains. Also add some slightly better support for -B. llvm-svn: 140645
* Get rid of useless helper Sema::CastCategory.Eli Friedman2011-09-275-16/+11
| | | | llvm-svn: 140642
* de-tmpify clang.Benjamin Kramer2011-09-2713-97/+90
| | | | llvm-svn: 140637
* Some changes to improve compatibility for MSVC-style C++ struct layout. ↵Eli Friedman2011-09-272-41/+216
| | | | | | Patch from r4start at gmail.com (with some minor modifications by me). llvm-svn: 140623
* Constant evaluation for pointer CXXScalarValueInitExprPeter Collingbourne2011-09-271-0/+2
| | | | llvm-svn: 140613
* Introduce a callback to PPCallbacks for lines skipped by the preprocessor.Argyrios Kyrtzidis2011-09-271-3/+10
| | | | | | Patch by Jason Haslam! llvm-svn: 140612
* Break SourceManager::translateFileLineCol into translateFile, no ↵Argyrios Kyrtzidis2011-09-271-5/+16
| | | | | | functionality change. llvm-svn: 140610
* When parsing a character literal, extract the characters from theDouglas Gregor2011-09-271-1/+1
| | | | | | | | 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-272-33/+9
| | | | | | | | | 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
* Let -B work for ld paths on Linux.David Chisnall2011-09-271-2/+2
| | | | llvm-svn: 140604
* Revert r140589. It was causing failures during llvm compilation:Bill Wendling2011-09-272-53/+2
| | | | | | | | | | | | | | 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
* Renaming PathDiagnosticClients.h to PathDiagnosticConsumers.h (issue 5397)David Blaikie2011-09-274-5/+5
| | | | llvm-svn: 140596
* PR11009: Fix a FIXME which was leading to an assertion failure with rvalue ↵Eli Friedman2011-09-271-4/+1
| | | | | | references. llvm-svn: 140594
* Add typo correction for the type name in C++ "new" statementsKaelyn Uhrain2011-09-272-2/+53
| | | | llvm-svn: 140589
* objc - don't complain about unimplemented property when conformingFariborz Jahanian2011-09-271-1/+2
| | | | | | | protocol declares the property, as well as one of its superclasses. Property will be implemented in the super class. // rdar://10120691 llvm-svn: 140586
* Fix regression of -Warray-bounds involving varargs functions [PR 11007].Ted Kremenek2011-09-261-0/+4
| | | | llvm-svn: 140584
* Add a comment in ASTReader::ReadPragmaDiagnosticMappings that the user bitArgyrios Kyrtzidis2011-09-261-0/+1
| | | | | | is set by the setDiagnosticMapping call. llvm-svn: 140578
* objc - compare setter/property types usingFariborz Jahanian2011-09-261-2/+2
| | | | | | hasSameUnqualifiedType in //rdar://10156674 llvm-svn: 140576
* objc - in matching setter argument type to its property type,Fariborz Jahanian2011-09-261-1/+2
| | | | | | ingore the type qualifiers. // rdar://10156674 llvm-svn: 140571
OpenPOWER on IntegriCloud