summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Fix gcc warning. Add parens to this assert, incidentally reassociating it, ↵Richard Smith2011-04-211-1/+1
| | | | | | but the condition is the same either way. llvm-svn: 129948
* Add a fixit suggest for missing case keywords inside a switch scope. For ↵Richard Trieu2011-04-217-7/+181
| | | | | | | | | | | instance, in the following code, 'case ' will be suggested before the '1:' switch (x) { 1: return 0; default: return 1; } llvm-svn: 129943
* Alphabetize this one flag, just to pull it out of my patch.Nick Lewycky2011-04-211-1/+1
| | | | llvm-svn: 129941
* Driver/Darwin: Allow OS X deployment targets like 10.4.11, even though theyDaniel Dunbar2011-04-213-5/+17
| | | | | | can't be represented in the environment define. llvm-svn: 129939
* Use the ArrayFiller to fill out "holes" in the array initializer due to ↵Argyrios Kyrtzidis2011-04-213-4/+16
| | | | | | | | designated initializers, avoiding to create separate Exprs for each one. llvm-svn: 129933
* PR9214: Convert Metadata API to use ArrayRef.Jay Foad2011-04-215-7/+8
| | | | llvm-svn: 129929
* Adds a function to run FrontendActions over in-memory code. This isManuel Klimek2011-04-216-0/+358
| | | | | | | | the first step towards a standalone Clang tool infrastructure. The plan is to make it easy to build command line tools that run over the AST of source files in a project outside of the build system. llvm-svn: 129924
* Driver: Tweak -Xarch diags a bit more, we can't actually differentiate betweenDaniel Dunbar2011-04-212-7/+1
| | | | | | | unknown and "required more arguments", but only the latter should be feasible in practice. llvm-svn: 129919
* Driver: Improve -Xarch argument diagnostics a bit.Daniel Dunbar2011-04-212-5/+16
| | | | llvm-svn: 129918
* Fixit suggestion for adding missing tag name should have a space after the ↵Argyrios Kyrtzidis2011-04-212-6/+16
| | | | | | tag name. Fixes rdar://9295072 llvm-svn: 129917
* Have #pragma message not turn into error by -Werror, by default. Fixes ↵Argyrios Kyrtzidis2011-04-213-2/+5
| | | | | | rdar://9308989. llvm-svn: 129916
* PR9772: Fix the definition of WINT_MIN and WINT_MAX on Linux -ffreestanding.Eli Friedman2011-04-213-2/+16
| | | | llvm-svn: 129907
* The 0.98 revision of the x86-64 ABI clarified a lot of things, someJohn McCall2011-04-213-10/+59
| | | | | | | of which break strict compatibility with previous compilers. Implement one of them and then immediately opt out on Darwin. llvm-svn: 129899
* ForArgyrios Kyrtzidis2011-04-219-17/+82
| | | | | | | | | | | | | | double data[20000000] = {0}; we would blow out the memory by creating 20M Exprs to fill out the initializer. To fix this, if the initializer list initializes an array with more elements than there are initializers in the list, have InitListExpr store a single 'ArrayFiller' expression that specifies an expression to be used for value initialization of the rest of the elements. Fixes rdar://9275920. llvm-svn: 129896
* Don't add type names for enums; they're never used in LLVM IR.Anders Carlsson2011-04-202-15/+16
| | | | llvm-svn: 129894
* fix a crash on code that uses the result value of __builtin___memcpy_chk.Chris Lattner2011-04-202-3/+9
| | | | llvm-svn: 129892
* Remove __builtin_ia32_loadup[sd] since clang can represent the actions natively.Bill Wendling2011-04-201-2/+0
| | | | llvm-svn: 129891
* When translating a Clang source range into a libclang source range,Douglas Gregor2011-04-202-2/+10
| | | | | | | | adjust the a ending macro location to the end of the instantiation location before adjusting it to the end of the token. Fixes <rdar://problem/9021561>. llvm-svn: 129872
* PTX: Add PTX intrinsics as builtins and add ptx32 and ptx64 as valid ↵Justin Holewinski2011-04-204-0/+258
| | | | | | architectures for triples, e.g. ptx32-unknown-unknown llvm-svn: 129870
* Improve test case from prior commit ever so slightlyDouglas Gregor2011-04-201-0/+1
| | | | llvm-svn: 129866
* Fix a crash-on-invalid involving non-identifier names in a memberDouglas Gregor2011-04-203-0/+19
| | | | | | | access expression that appears to be a property reference. Fixes <rdar://problem/8985943>. llvm-svn: 129865
* Give invalid tag types 8-bit size and alignment, rather than 1-bitDouglas Gregor2011-04-201-2/+2
| | | | | | | | alignment, which causes traps further down the line. Fixes <rdar://problem/9109755>, which contains a test case far too large to commit :( llvm-svn: 129861
* Eliminate an uninteresting assertion; invalid code involvingDouglas Gregor2011-04-201-2/+0
| | | | | | | | out-of-line destructors can result in the addition of redundant destructors to a class. It's not harmful to the AST. Fixes <rdar://problem/9158632>. llvm-svn: 129860
* Rename 'CXTUMemoryUsage…' to 'CXTUResourceUsage…'.Ted Kremenek2011-04-205-45/+51
| | | | llvm-svn: 129857
* Use S.str() to force a flush.Fariborz Jahanian2011-04-201-3/+1
| | | | llvm-svn: 129856
* Driver: Suppress some additional warnings with -Qunused-arguments.Daniel Dunbar2011-04-201-0/+4
| | | | llvm-svn: 129853
* Be sure to flush raw_string_ostream objects in the Objective-CDouglas Gregor2011-04-201-0/+2
| | | | | | rewriter, from Eric Niebler! llvm-svn: 129849
* Teach SourceManager::getSLocEntry() that it can fail due to problemsDouglas Gregor2011-04-206-44/+155
| | | | | | | | during deserialization from a precompiled header, and update all of its callers to note when this problem occurs and recover (more) gracefully. Fixes <rdar://problem/9119249>. llvm-svn: 129839
* TWEAKDaniel Dunbar2011-04-192-3/+3
| | | | llvm-svn: 129835
* Driver/Darwin: Switch to using -macosx for OS name in triples.Daniel Dunbar2011-04-192-6/+2
| | | | llvm-svn: 129834
* IRgen/ARM: Fix a think-o in conversion-to-null for member function pointers, weDaniel Dunbar2011-04-191-5/+6
| | | | | | | | were computing the conversion as (ptr != 0 && non-virtual), when it should be (ptr != 0 || is-virtual). - Test to follow in LLVM test-suite. llvm-svn: 129830
* some cleanups to use IRBuilder methods instead of llvm:: foo methods.Chris Lattner2011-04-191-42/+34
| | | | llvm-svn: 129829
* Driver/Darwin: Switch to using new style triples.Daniel Dunbar2011-04-192-18/+6
| | | | llvm-svn: 129824
* ADT/Triple: Switch to using .isOSDarwin() predicate.Daniel Dunbar2011-04-198-49/+52
| | | | llvm-svn: 129823
* Avoid superfluous warning after an error is detcted and reported.Fariborz Jahanian2011-04-192-3/+6
| | | | | | // rdar://9132143 llvm-svn: 129822
* Basic/Darwin: Add support for new -osx and -ios style triples (not yet used).Daniel Dunbar2011-04-191-17/+33
| | | | llvm-svn: 129820
* use the newly introduced IRBuilder getInt() method to reduce someChris Lattner2011-04-191-17/+12
| | | | | | redundancy pointed out by John. llvm-svn: 129808
* We regard a function as 'unused' from the codegen perspective, so our ↵Argyrios Kyrtzidis2011-04-1911-13/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | warnings diverge from gcc's unused warnings which don't get emitted if the function is referenced even in an unevaluated context (e.g. in templates, sizeof, etc.). Also, saying that a function is 'unused' because it won't get codegen'ed is somewhat misleading. - Don't emit 'unused' warnings for functions that are referenced in any part of the user's code. - A warning that an internal function/variable won't get emitted is useful though, so introduce -Wunneeded-internal-declaration which will warn if a function/variable with internal linkage is not "needed" ('used' from the codegen perspective), e.g: static void foo() { } template <int> void bar() { foo(); } test.cpp:1:13: warning: function 'foo' is not needed and will not be emitted static void foo() { } ^ Addresses rdar://8733476. llvm-svn: 129794
* Add a new expression classification, CL_AddressableVoidPeter Collingbourne2011-04-193-4/+21
| | | | | | | | | CL_AddressableVoid is the expression classification used for void expressions whose address can be taken, i.e. the result of [], * or void variable references in C, as opposed to things like the result of a void function call. llvm-svn: 129783
* Add missing break statements.Ted Kremenek2011-04-191-0/+2
| | | | llvm-svn: 129750
* Make the VariadicMethodTypeChecker accept block pointers as Objective-C ↵Anders Carlsson2011-04-192-0/+5
| | | | | | pointers. Fixes PR9746. llvm-svn: 129741
* Fix line endingsMatt Beaumont-Gay2011-04-191-40/+40
| | | | llvm-svn: 129740
* Driver/Darwin: Change to use generic iOS runtime library, which we now ↵Daniel Dunbar2011-04-182-5/+3
| | | | | | always need. llvm-svn: 129734
* Report memory usage for global code completion results in CXTUMemoryUsage.Ted Kremenek2011-04-183-9/+21
| | | | llvm-svn: 129733
* Unbreak the MSVC build: Don't mix variable declarations and statements in a ↵Francois Pichet2011-04-181-2/+4
| | | | | | .c file. llvm-svn: 129732
* Add libclang API to query how much memory is used by a CXTranslationUnit. ↵Ted Kremenek2011-04-185-5/+155
| | | | | | | | This is a WIP. Currently we report the amount used for expressions, types, identifiers, and selectors. llvm-svn: 129730
* Add ASTContext::getTotalMemory() to allow clients to query how much memory ↵Ted Kremenek2011-04-181-0/+6
| | | | | | is bump allocated for declarations, statements, and types. llvm-svn: 129729
* Add SelectorTable::getTotalMemory() to allow clients to query how much ↵Ted Kremenek2011-04-182-0/+7
| | | | | | memory is used by selectors. llvm-svn: 129728
* Driver/Darwin: Disable movw/movt with -mkernel or -fapple-kext.Daniel Dunbar2011-04-181-0/+6
| | | | llvm-svn: 129721
* Fix a bug in calculation of composite typeFariborz Jahanian2011-04-182-3/+28
| | | | | | | | of conditional expressions of objc pointer types where one type is the immediate base type of the other. // rdar://9296866 llvm-svn: 129718
OpenPOWER on IntegriCloud