summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* CodeGen: Assign linkage to thread-wrappers correctlyDavid Majnemer2014-05-052-2/+11
| | | | | | | | | | We would sometimes incorrectly give a thread-wrapper external linkage instead of internal linkage if we had only CodeGen'd it's declaration, not it's definition. This fixes PR19655. llvm-svn: 207988
* Fix handling of condition variables in the face of temp dtors.Manuel Klimek2014-05-052-13/+10
| | | | | | | | The assignment needs to be before the destruction of the temporary. This patch calls out to addStmt, which invokes VisitDeclStmt, which has all the correct logic for handling temporaries. llvm-svn: 207985
* CodeGen: Cleanup visibility in RTTIBuilderDuncan P. N. Exon Smith2014-05-051-9/+5
| | | | | | No functionality change. llvm-svn: 207978
* Add -Wmodule-build to make it easy to see when modules are (re)builtBen Langmuir2014-05-053-0/+27
| | | | | | Warning is default ignore, and not in -Wall. llvm-svn: 207975
* clang-format: Understand functions with decltype return type.Daniel Jasper2014-05-052-1/+10
| | | | | | | | | | | | Before: decltype(long_name_forcing_break) f() {} After: decltype(long_name_forcing_break) f() {} llvm-svn: 207965
* Added some heuristics to identify c style castingDinesh Dwivedi2014-05-052-17/+46
| | | | | | | | | | | | | | Before: void f() { my_int a = (my_int) * b; } void f() { return P ? (my_int) * P : (my_int)0; } After: void f() { my_int a = (my_int)*b; } void f() { return P ? (my_int)*P : (my_int)0; } Differential Revision: http://reviews.llvm.org/D3576 llvm-svn: 207964
* Driver: Recognize CentOS 6 as RHEL 6.Benjamin Kramer2014-05-051-11/+9
| | | | | | Patch by Dimitry Andric! llvm-svn: 207963
* StringRefize and take out an old FIXMEAlp Toker2014-05-054-9/+8
| | | | llvm-svn: 207962
* clang-format: Improve understanding of decltype.Daniel Jasper2014-05-052-1/+5
| | | | | | | | | | Before: SomeFunction([](decltype(x), A * a) {}); After: SomeFunction([](decltype(x), A *a) {}); llvm-svn: 207961
* Fix bug in clang-format while merging short functionDinesh Dwivedi2014-05-052-4/+95
| | | | | | | | | | | | | | | | | | | | | Before: #ifdef _DEBUG int foo( int i = 0 ) #else int foo( int i = 5 ) #endif { return i; } After: #ifdef _DEBUG int foo( int i = 0 ) #else int foo( int i = 5 ) #endif { return i; } llvm-svn: 207958
* Fix crash when resolving branch conditions for temporary destructor ↵Manuel Klimek2014-05-052-25/+52
| | | | | | | | | | | | | | | | | | | | condition blocks. Document and simplify ResolveCondition. 1. Introduce a temporary special case for temporary desctructors when resolving the branch condition - in an upcoming patch, alexmc will change temporary destructor conditions to not run through this logic, in which case we can remove this (marked as FIXME); this currently fixes a crash. 2. Simplify ResolveCondition; while documenting the function, I noticed that it always returns the last statement - either that statement is the condition itself (in which case the condition was returned anyway), or the rightmost leaf is returned; for correctness, the rightmost leaf must be evaluated anyway (which the CFG does in the last statement), thus we can just return the last statement in that case, too. Added an assert to verify the invariant. llvm-svn: 207957
* Simplify getARMCPUForMArch() and make it more consistentChristian Pirker2014-05-052-53/+53
| | | | llvm-svn: 207956
* clang-format: Fix import statements with ColumnLimit: 0Daniel Jasper2014-05-052-1/+6
| | | | | | These used to interact badly with AlwaysBreakBeforeMultilineStrings. llvm-svn: 207955
* Update lit.cfg to support the clang-interpreter test from r207950Alp Toker2014-05-052-0/+2
| | | | | | | Performs behind-the-scenes RUN line substitution similarly to what's done with clang-check and clang-format to ensure the executable is found. llvm-svn: 207951
* Add speculative clang-interpreter testAlp Toker2014-05-051-0/+10
| | | | | | | | | | | Let's see how far this gets on the build servers. The application requires native JIT and uses the C standard library, but hopefully we can get this tested on at least some configurations. Taking a lead from the clang-format tests, we'll just expect the executable to get picked up from the build output path for now. llvm-svn: 207950
* Make module self-import an errorBen Langmuir2014-05-055-7/+21
| | | | | | | | Ideally, importing Foo.a from Foo.b would "do the right thing", but until it does, this patch makes it an error rather than allow it to silently be ignored. llvm-svn: 207948
* cindex-dump.py: fix the --show-ids description stringAlp Toker2014-05-051-1/+1
| | | | | | It looks like this was botched back in r94936. llvm-svn: 207947
* Fix cindex-dump.py --show-idsAlp Toker2014-05-051-1/+1
| | | | | | | | | | | | | This option flag was incorrectly expecting an argument: $ cindex-dump.py --show-ids test.cpp cindex-dump.py: error: invalid number arguments With this change the feature correctly gets enabled by --show-ids. No tests. llvm-svn: 207946
* Split out header integration testsAlp Toker2014-05-044-0/+0
| | | | | | | | | | | | These are somewhat arbitrary tests that check if "thing goes fine" when processing various platform-specific headers. Also move warn-sysheader.cpp to Misc where the other diagnostics infrastructure tests live. File moves only. llvm-svn: 207936
* Speculative fix to unbreak the buildbots that fail with compiler errors.Argyrios Kyrtzidis2014-05-041-2/+2
| | | | llvm-svn: 207933
* Fix a use-after-free bug I recently introduced in lookupModuleFileBen Langmuir2014-05-041-4/+3
| | | | llvm-svn: 207932
* [Modules] Add the resource-dir to the module hash.Argyrios Kyrtzidis2014-05-041-1/+2
| | | | llvm-svn: 207931
* CodeGen: complete ARM ACLE hint 8.4 supportSaleem Abdulrasool2014-05-043-5/+47
| | | | | | | Add support for the remaining hints from the ACLE. Although __dbg is listed as a hint, it is handled different, so it is not covered by this change. llvm-svn: 207930
* Target: fix wchar_t definition for Windows on ARMSaleem Abdulrasool2014-05-042-2/+14
| | | | | | | | Windows on ARM uses AAPCS, but has some deviations. wchar_t remains an unsigned short on WoA, which does not conform to AAPCS. Ensure that wchar_t is defined accordingly. llvm-svn: 207929
* Minor cleanups, no behavior change.Nico Weber2014-05-031-11/+9
| | | | | | | | | | * Fixes a "return" that was indented at the same level as the continuation from the previous line * Wrap several lines to 80 columns * Remove an if check that was always true * Move a variable declaration slightly closer to its use llvm-svn: 207922
* Wrap a few lines at 80 columns, change a confusing indent. No behavior change.Nico Weber2014-05-034-15/+16
| | | | llvm-svn: 207921
* Replace one-element SmallVectors inside DenseMaps with TinyPtrVector.Benjamin Kramer2014-05-034-9/+9
| | | | | | That's exactly what TinyPtrVector was designed for. No functionality change. llvm-svn: 207919
* Remove unused diagnostics.Benjamin Kramer2014-05-031-4/+0
| | | | llvm-svn: 207908
* [leaks] The PDFileEntry nodes in the FilesMade FoldingSet containChandler Carruth2014-05-032-1/+8
| | | | | | | | a std::vector that allocates on the heap. As a consequence, we have to run all of their destructors when tearing down the set, not just deallocate the memory blobs. llvm-svn: 207902
* [leaks] Re-shuffle code such that we don't create a basic block forChandler Carruth2014-05-031-9/+11
| | | | | | | | | | initializing an array unless we need it. Specifically, position the creation of a new basic block after we've checked all of the cases that bypass the need for it. Fixes another leak in test/CodeGen* found by LSan. llvm-svn: 207900
* [leaks] Don't leak the fake arguments we synthesize for LLVM optionChandler Carruth2014-05-031-2/+2
| | | | | | parsing. llvm-svn: 207899
* Eliminate ASTContext's DelayInitialization flagAlp Toker2014-05-035-32/+15
| | | | | | | | | Having various possible states of initialization following construction doesn't add value here. Also remove the unused size_reserve parameter. llvm-svn: 207897
* Fix a bunch of mislayered clang/Lex includes from SemaAlp Toker2014-05-0322-109/+100
| | | | llvm-svn: 207896
* Update Preprocessor::Initialize() documentation following r207825Alp Toker2014-05-031-3/+3
| | | | llvm-svn: 207895
* CodeGen: Cleanup ABIArgInfoDavid Majnemer2014-05-031-64/+111
| | | | | | | | | | ABIArgInfo was pretty hard to grok, it had data members with names like "BoolData0" and "UIntData". Constructors with lots of bool arguments. Reusing the same data member for multiple purposes. It was also wasteful with memory, this new layout is 8 bytes smaller. llvm-svn: 207894
* Revert "Sema: Implement DR244"David Majnemer2014-05-034-8/+8
| | | | | | | | This was accidentally committed. This reverts commit r207892. llvm-svn: 207893
* Sema: Implement DR244David Majnemer2014-05-034-8/+8
| | | | | | | | | Naming the destructor using a typedef-name for the class-name is well-formed. This fixes PR19620. llvm-svn: 207892
* Err, wait. Those new test functions in r207890 need CHECK lines.Nick Lewycky2014-05-031-0/+6
| | | | llvm-svn: 207891
* Rewrite NRVO determination. Track NRVO candidates on the parser Scope and ↵Nick Lewycky2014-05-0311-72/+185
| | | | | | | | apply the NRVO candidate flag to all possible NRVO candidates here, and remove the flags in computeNRVO or upon template instantiation. A variable now has NRVO applied if and only if every return statement in that scope returns that variable. This is nearly optimal. Performs NRVO roughly 7% more often in a bootstrap build of clang. Patch co-authored by Richard Smith. llvm-svn: 207890
* MS ABI x64: Pass small objects with dtors but no copy ctors directlyReid Kleckner2014-05-034-17/+74
| | | | | | | | | | | | | | | Passing objects directly (in registers or memory) creates a second copy of the object in the callee. The callee always destroys its copy, but we also have to destroy any temporary created in the caller. In other words, copy elision of these kinds of objects is impossible. Objects larger than 8 bytes with non-trivial dtors and trivial copy ctors are still passed indirectly, and we can still elide copies of them. Fixes PR19640. llvm-svn: 207889
* [leaks] Fix a leak of a basic block when we successfully fold a switchChandler Carruth2014-05-031-7/+10
| | | | | | | | | | | condition to a constant and emit only the relevant statement. In that case, we were previously creating the epilog jump destination, a cleanup scope, and emitting any condition variable into it. Instead, we can emit the condition variable (if we have one) into the cleanup scope used for the entire folded case sequence. We avoid creating a jump dest, a basic block, and an extra cleanup scope. Win! llvm-svn: 207888
* Fix PR 19630, don't crash when file ends with whitespace.Richard Trieu2014-05-022-1/+15
| | | | llvm-svn: 207883
* [leaks] Parse the schema file every time we try to verify the XML. Yes,Chandler Carruth2014-05-021-29/+16
| | | | | | | | | | | | this is wasteful, blah blah, but this is a test utility only. It turns out that without doing this, libxml2 will always leak a bunch of the XML data, and that is causing failures with LSan. This is also quite a bit simpler and I don't think it is slow enough to really be a show stopper. If someone yells about the runtime of c-index-test, we can do other things to try to mitigate it, but the current strategy wasn't working well. llvm-svn: 207882
* Fix clang-cl Driver leakHans Wennborg2014-05-022-3/+4
| | | | | | | We were synthesizing new arguments from e.g. '/Tcfile.c' arguments, but didn't handle ownership correctly. llvm-svn: 207880
* clang-c: Fix a typoJustin Bogner2014-05-021-1/+1
| | | | llvm-svn: 207879
* [sanitizers] Propagate the sanitizer options through to the lit context.Chandler Carruth2014-05-021-0/+5
| | | | | | | | This makes it *really* easy to debug leaks FYI: ASAN_OPTIONS=detect_leaks=1 ./bin/llvm-lit -v <path to test> llvm-svn: 207873
* [leaks] Fix a leak recently introduced to the pragma handling. ThisChandler Carruth2014-05-021-0/+1
| | | | | | | | | whole code would be better with std::unique_ptr managing the lifetimes of the handlers, but I wanted to make a targeted fix to the leaks first. With this change, all of the Clang preprocessor tests are leak free with LSan. llvm-svn: 207872
* Remove unused typedef found by gcc's -Wunused-local-typedefs.Nico Weber2014-05-021-2/+0
| | | | llvm-svn: 207870
* Fix null pointer segfault when calling dump() on a DeclStmt containing a ↵Alex McCarthy2014-05-021-0/+3
| | | | | | VarDecl. llvm-svn: 207867
* [driver] Enable the slp vectorizer at -Oz.Chad Rosier2014-05-022-7/+9
| | | | | | PR19568 llvm-svn: 207858
OpenPOWER on IntegriCloud