summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* clang-format: Understand functions with decltype return type.Daniel Jasper2014-05-051-1/+8
| | | | | | | | | | | | 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-051-10/+34
| | | | | | | | | | | | | | 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-052-5/+5
| | | | llvm-svn: 207962
* clang-format: Improve understanding of decltype.Daniel Jasper2014-05-051-1/+2
| | | | | | | | | | 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-051-4/+5
| | | | | | | | | | | | | | | | | | | | | 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-051-12/+34
| | | | | | | | | | | | | | | | | | | | 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-051-53/+39
| | | | llvm-svn: 207956
* clang-format: Fix import statements with ColumnLimit: 0Daniel Jasper2014-05-051-1/+1
| | | | | | These used to interact badly with AlwaysBreakBeforeMultilineStrings. llvm-svn: 207955
* Make module self-import an errorBen Langmuir2014-05-052-1/+8
| | | | | | | | 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
* 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-041-5/+20
| | | | | | | 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-041-2/+9
| | | | | | | | 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-032-5/+4
| | | | | | That's exactly what TinyPtrVector was designed for. No functionality change. llvm-svn: 207919
* [leaks] The PDFileEntry nodes in the FilesMade FoldingSet containChandler Carruth2014-05-031-0/+5
| | | | | | | | 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-033-22/+8
| | | | | | | | | 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-0321-108/+91
| | | | llvm-svn: 207896
* Revert "Sema: Implement DR244"David Majnemer2014-05-031-3/+3
| | | | | | | | This was accidentally committed. This reverts commit r207892. llvm-svn: 207893
* Sema: Implement DR244David Majnemer2014-05-031-3/+3
| | | | | | | | | Naming the destructor using a typedef-name for the class-name is well-formed. This fixes PR19620. llvm-svn: 207892
* Rewrite NRVO determination. Track NRVO candidates on the parser Scope and ↵Nick Lewycky2014-05-038-65/+111
| | | | | | | | 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-032-16/+38
| | | | | | | | | | | | | | | 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-021-1/+2
| | | | llvm-svn: 207883
* Fix clang-cl Driver leakHans Wennborg2014-05-021-2/+3
| | | | | | | We were synthesizing new arguments from e.g. '/Tcfile.c' arguments, but didn't handle ownership correctly. llvm-svn: 207880
* [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-021-6/+8
| | | | | | PR19568 llvm-svn: 207858
* Fix bad comment from r207573.Hans Wennborg2014-05-021-1/+1
| | | | llvm-svn: 207854
* Small formatting change.Eric Christopher2014-05-021-1/+1
| | | | llvm-svn: 207852
* Fixes issue with Allman BreakBeforeBraces for Objective C @interfaceDinesh Dwivedi2014-05-021-2/+5
| | | | | | | | | | | | | | | | | | | Before: @interface BSApplicationController () { @private id _extraIvar; } @end After: @interface BSApplicationController () { @private id _extraIvar; } @end llvm-svn: 207849
* Add support for -march=bdver4.Benjamin Kramer2014-05-021-0/+10
| | | | llvm-svn: 207848
* [ARM64/AArch64] Define the correct value for __ARM_NEON_FPBradley Smith2014-05-021-2/+2
| | | | llvm-svn: 207842
* [ARM64/AArch64] Hook up CRC32 subtarget feature to the driverBradley Smith2014-05-022-0/+23
| | | | llvm-svn: 207841
* Updated the attribute tablegen emitter for variadic arguments to emit a ↵Aaron Ballman2014-05-024-33/+20
| | | | | | range accessor in addition to the iterators. Updated code using iterators to use range-based for loops. llvm-svn: 207837
* Renaming the CallableState variadic attribute argument to be CallableStates. ↵Aaron Ballman2014-05-021-2/+2
| | | | | | No functional changes intended. llvm-svn: 207836
* XCore target: fix bug in dereferencing null pointer.Robert Lytton2014-05-021-6/+7
| | | | | | Also add basic cpp ABI tests where they differ from C ABI output. llvm-svn: 207834
* XCore target: fix handling of -g0 flagRobert Lytton2014-05-021-2/+3
| | | | llvm-svn: 207833
* XCore target: Add TypeString meta data to IR output.Robert Lytton2014-05-023-0/+551
| | | | | | | This includes the addition of the virtual function: TargetCodeGenInfo::EmitTargetMD() llvm-svn: 207832
* CodeGen: rename __builtin_arm_sevl to __sevlSaleem Abdulrasool2014-05-021-5/+5
| | | | | | | ACLE adds the __sevl() extension. Rename the hint from a custom name to the ACLE specified name. llvm-svn: 207829
* Reformat code following Preprocessor constructor updatesAlp Toker2014-05-023-16/+12
| | | | | | Landing this separately to make the previous commits easy to follow at home. llvm-svn: 207826
* Factor TargetInfo pointer/DelayInitialization bool pair out of Preprocessor ctorAlp Toker2014-05-023-13/+7
| | | | | | | | The Preprocessor::Initialize() function already offers a clear interface to achieve this, further reducing the confusing number of states a newly constructed preprocessor can have. llvm-svn: 207825
* Remove unused IncrProcessing parameter from Preprocessor ctorAlp Toker2014-05-022-4/+2
| | | | | | | Preprocessor::enableIncrementalProcessing() provides a consistent interface to enable the feature. llvm-svn: 207824
* Cut off parsing early during code completionAlp Toker2014-05-022-5/+4
| | | | | | | | | These calls to ConsumeCodeCompletionToken() caused parsing to continue needlessly when an immediate cutOffParsing() would do. Document the function to clarify its correct usage. llvm-svn: 207823
OpenPOWER on IntegriCloud