summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* [CMake] Always include the Clang repo version, just like the autoconf build.Jordan Rose2014-11-191-25/+43
| | | | | | | | | | | | | | Now that LLVM's helper script GetSVN.cmake actually works consistently, there's no reason not to use it. We avoid having to regenerate SVNVersion.inc every time by marking it as dependent on Git's reflog or SVN's entries file. This should end most of the issues of the AST format changing and breaking old module files: CMake-Clang should now detect that the version changed just like Autoconf-Clang has. Based on r190557. Depends on LLVM r222391. llvm-svn: 222393
* Constify a few IdentifierInfo * parameters.Jordan Rose2014-11-192-5/+6
| | | | | | No functionality change. llvm-svn: 222392
* Fix bug where a trivial constexpr copy/move operation couldn't copy from anRichard Smith2014-11-193-4/+72
| | | | | | | empty non-constexpr object. Such a copy doesn't break any of the constexpr rules. llvm-svn: 222387
* DebugInfo: Don't emit a 'global variable' when a static member declaration ↵David Blaikie2014-11-193-8/+36
| | | | | | | | | is referenced without a definition, just ensure the enclosing class (with the static member declaration) is emitted. Addresses PR21511 by emitting appropriate metadata rather than faux-global definitions for a variable that doesn't have a definition. llvm-svn: 222377
* Fix a temporary MDNode leak.Frederic Riss2014-11-191-0/+7
| | | | | | | | | | | | While emitting debug information for function forward decalrations, we create DISubprogram objects that aran't stored in the AllSubprograms list, and thus won't get finalized by the DIBuilder. During the DIBuilder finalize(), the temporary MDNode allocated for the DISubprogram Variables field gets RAUWd with a non temporary DIArray. For the forward declarations, simply delete that temporary node before we delete the parent node, so that it doesn't leak. llvm-svn: 222373
* Driver: correct typoSaleem Abdulrasool2014-11-192-1/+6
| | | | | | Fix a typo in the search path identified by Justin Bogner. llvm-svn: 222371
* clang-format: [Java] Ignore C++-specific keywordsDaniel Jasper2014-11-192-0/+11
| | | | | | | | | | | | | | | | | | Before: public void union (Object o); public void struct (Object o); public void delete (Object o); After: public void union(Object o); public void struct(Object o); public void delete(Object o); Patch by Harry Terkelsen, thank you! llvm-svn: 222357
* Allow EmitVAArg() to promote types and use this to fix some N32/N64 vararg ↵Daniel Sanders2014-11-193-21/+169
| | | | | | | | | | | | | | | | | | | | | issues for Mips. Summary: With this patch, passing a va_list to another function and reading 10 int's from it works correctly on a big-endian target. Based on a pair of patches by David Chisnall, one of which I've reworked for the current trunk. Reviewers: theraven, atanasyan Reviewed By: theraven, atanasyan Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6248 llvm-svn: 222339
* Update for LLVM API change to make Small(Ptr)Set::insert return ↵David Blaikie2014-11-1937-125/+139
| | | | | | pair<iterator, bool> as per the C++ standard's associative container concept. llvm-svn: 222335
* Add the exception for strings in logical and expressions to -Wstring-conversionRichard Trieu2014-11-192-2/+26
| | | | | | for C code. llvm-svn: 222327
* clang-format a recent commit I madeDavid Blaikie2014-11-197-16/+15
| | | | llvm-svn: 222317
* Wrap to 80 columns, no behavior change.Nico Weber2014-11-193-9/+10
| | | | llvm-svn: 222315
* Standardize on StringMap::insert, removing uses of StringMap::GetOrCreateValue.David Blaikie2014-11-1917-146/+128
| | | | llvm-svn: 222306
* Update for LLVM API changeDavid Blaikie2014-11-195-6/+6
| | | | llvm-svn: 222303
* clang-format: Add option to disable alignment after opening bracketsDaniel Jasper2014-11-186-8/+78
| | | | | | | | | | | | | | Before: SomeFunction(parameter, parameter); After: SomeFunction(parameter, parameter); Patch by Harry Terkelsen, thank you! llvm-svn: 222284
* clang-format: Fix space between generic type parameter and squareDaniel Jasper2014-11-182-0/+5
| | | | | | | | | | | | | | bracket Before: public Foo<X, Y> [] foos; After: public Foo<X, Y>[] foos; Patch by Harry Terkelsen. Thank you! llvm-svn: 222283
* Fix 80-column violations, trailing whitespace, comment text.Eric Christopher2014-11-181-63/+74
| | | | llvm-svn: 222269
* This test also requires an aarch64 target.Eric Christopher2014-11-181-0/+1
| | | | llvm-svn: 222268
* [Sema] Patch to issue warning on comparing parameters withFariborz Jahanian2014-11-186-1/+124
| | | | | | | | | | | nonnull attribute when comparison is always true/false. Original patch by Steven Wu. I have added extra code to prevent issuing of warning when the nonnull parameter is modified prior to the comparison. This addition prevents false positives in the most obvious cases. There may still be false positive warnings in some cases (as one of my tests indicates), but benefit far outweighs such cases. rdar://18712242 llvm-svn: 222264
* OMPAtomicDirective::Create(): Fix \param. [-Wdocumentation]NAKAMURA Takumi2014-11-181-1/+1
| | | | llvm-svn: 222237
* [OPENMP] Additional processing of 'omp atomic read' directive.Alexey Bataev2014-11-188-26/+259
| | | | | | According to OpenMP standard, Section 2.12.6, atomic Construct, '#pragma omp atomic read' is allowed to be used only for expression statements of form 'v = x;', where x and v (as applicable) are both l-value expressions with scalar type. Patch adds checks for it. llvm-svn: 222231
* Add PIC-level support to Clang.Justin Hibbits2014-11-182-0/+19
| | | | | | | | | | | | | | | | | | Summary: This distinguishes between -fpic and -fPIC now, with the additions in LLVM for PIC level support. Test Plan: No regressions Reviewers: echristo, rafael Reviewed By: rafael Subscribers: rnk, emaste, llvm-commits Differential Revision: http://reviews.llvm.org/D5400 llvm-svn: 222227
* [ASTReader] Add a convenience function to retrieve all the input files of a ↵Argyrios Kyrtzidis2014-11-182-0/+12
| | | | | | module file. llvm-svn: 222224
* Fully handle globals and functions in CGDebugInfo::getDeclarationOrDefinition()Frederic Riss2014-11-183-18/+122
| | | | | | | | | | | | | | | | | | | | Currently this function would return nothing for functions or globals that haven't seen a definition yet. Make it return a forward declaration that will get RAUWed with the definition if one is seen at a later point. The strategy used to implement this is similar to what's done for types: the forward declarations are stored in a vector and post processed upon finilization to perform the required RAUWs. For now the only user of getDeclarationOrDefinition() is EmitUsingDecl(), thus this patch allows to emit correct imported declarations even in the absence of an actual definition of the imported entity. (Another user will be the debug info generation for argument default values that I need to resurect). Differential Revision: http://reviews.llvm.org/D6173 llvm-svn: 222220
* [DebugInfo] Move collection of various function/var decl properties into ↵Frederic Riss2014-11-182-59/+94
| | | | | | | | helper functions. NFC. Helpers to be re-used in upcoming commit. llvm-svn: 222219
* InstrProf: Don't emit coverage for uninstantiated templatesJustin Bogner2014-11-182-7/+29
| | | | | | | | | | | | | We include unused functions and methods in -fcoverage-mapping so that we can differentiate between uninstrumented and unused. This can cause problems for uninstantiated templates though, since they may involve an incomplete type that can't be mangled. This shows up in things like libc++'s <unordered_map> and makes coverage unusable. Avoid the issue by skipping uninstantiated methods of a templated class. llvm-svn: 222204
* Debug Info: context field of a global variable is DIScopeRef.Manman Ren2014-11-181-1/+1
| | | | | | Paired commit with r222195. llvm-svn: 222196
* Fix an assertion when ending a function definition.John McCall2014-11-182-1/+47
| | | | | | | | | | | | | | | | | | | | The bug is that ExprCleanupObjects isn't always empty in a fresh evaluation context. New evaluation contexts just track the current depth of the stack. The assertion will misfire whenever we finish processing a function body inside an expression that contained an earlier block literal with non-trivial captures. That's actually a lot less likely than you'd think, though, because it has to be a real function declaration, not just another block. Mixed block/lambda code would work, as would a template instantiation or a local class definition. The code works correctly if the assertion is disabled. rdar://16356628 llvm-svn: 222194
* Make DiagnosticsEngine::takeClient return std::unique_ptr<>Alexander Kornienko2014-11-1710-58/+34
| | | | | | | | | | | | | | | | | | Summary: Make DiagnosticsEngine::takeClient return std::unique_ptr<>. Updated callers to store conditional ownership using a pair of pointer and unique_ptr instead of a pointer + bool. Updated code that temporarily registers clients to use the non-owning registration (+ removed extra calls to takeClient). Reviewers: dblaikie Reviewed By: dblaikie Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6294 llvm-svn: 222193
* Handle use of default member initializers before end of outermost classReid Kleckner2014-11-1715-89/+301
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifically, when we have this situation: struct A { template <typename T> struct B { int m1 = sizeof(A); }; B<int> m2; }; We can't parse m1's initializer eagerly because we need A to be complete. Therefore we wait until the end of A's class scope to parse it. However, we can trigger instantiation of B before the end of A, which will attempt to instantiate the field decls eagerly, and it would build a bad field decl instantiation that said it had an initializer but actually lacked one. Fixed by deferring instantiation of default member initializers until they are needed during constructor analysis. This addresses a long standing FIXME in the code. Fixes PR19195. Reviewed By: rsmith Differential Revision: http://reviews.llvm.org/D5690 llvm-svn: 222192
* CodeGen: make a check stricterSaleem Abdulrasool2014-11-171-2/+2
| | | | | | | | | When targeting Windows itanium (a MSVC environment), use itanium style exceptions rather than SEH. Existing test cases already test this code path. Applying this change ensures that tests wont break due to a parallel change in LLVM (to correctly report isMSVCEnvironment). llvm-svn: 222179
* Missing comma in a string array initialization (CID 1254893)Sylvestre Ledru2014-11-171-1/+1
| | | | | | | | | | | | | | Summary: We have this error from a while (Wed Jun 15 18:02:42 2011 r133103) Reviewers: rsmith Reviewed By: rsmith Differential Revision: http://reviews.llvm.org/D6296 llvm-svn: 222169
* clang-cl: Allow /Fo without an argument (PR21589)Hans Wennborg2014-11-172-21/+19
| | | | | | | | | | When it's used without an argument, the default file name is used. The same goes for /Fe. Also, allow using /Fo, /Fa and /Fe with multiple inputs if they don't have an argument. llvm-svn: 222164
* clang-format: Fix more incorrect pointer detection.Daniel Jasper2014-11-172-1/+2
| | | | | | | | | | Before: Constructor() : a(a), b(c, d *e) {} After: Constructor() : a(a), b(c, d * e) {} llvm-svn: 222158
* test/Driver/cl-outputs.c: tweak some check prefixes; NFC.Hans Wennborg2014-11-171-26/+26
| | | | | | These tests deal with the /o option; rename to better reflect that. llvm-svn: 222157
* Basic: tweak commentSaleem Abdulrasool2014-11-171-0/+1
| | | | | | | Add a missing surrounding brace for doxygen group. This messes with pair jumping in vim and is annoying. NFC. llvm-svn: 222155
* Fix the indentation: Nesting level does not match indentation (CID 1254863)Sylvestre Ledru2014-11-171-2/+2
| | | | llvm-svn: 222152
* Fixing a use of stringstream to use an LLVM helper function. Drive-by fixing ↵Aaron Ballman2014-11-171-7/+3
| | | | | | header include order. NFC. llvm-svn: 222151
* [Reassociate] Update test cases due to r222142.Chad Rosier2014-11-173-10/+10
| | | | llvm-svn: 222144
* Minor readability tweaks to VFTableBuilder.cppTimur Iskhodzhanov2014-11-171-12/+14
| | | | llvm-svn: 222140
* Add a couple more examples illustrating why we need vtordisps and how they workTimur Iskhodzhanov2014-11-171-1/+98
| | | | llvm-svn: 222133
* Remove VariadicOperatorMatcherInterface as it is redundant with logic from ↵Samuel Benzaquen2014-11-175-50/+26
| | | | | | | | | | | | | | | | | | | DynTypedMatcher. Summary: The generic variadic matcher is faster (one less virtual function call per match) and doesn't require template instantiations which reduces compile time and binary size. Registry.cpp.o generates ~14% less symbols and compiles ~7.5% faster. The change also speeds up our clang-tidy benchmark by ~2%. Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D6278 llvm-svn: 222131
* A small correction for r221884. No functional changes.Alexander Kornienko2014-11-171-1/+1
| | | | llvm-svn: 222130
* clang-format: Fix regression introduced in r221609.Daniel Jasper2014-11-172-1/+3
| | | | | | | | | | Before: void f() { f(a, c *d); } After: void f() { f(a, c * d); } llvm-svn: 222128
* [Sanitizer] Parse and produce all sanitizer-relevant arguments in SanitizerArgs.Alexey Samsonov2014-11-164-66/+68
| | | | | | | | | | | | | In particular, make SanitizerArgs responsible for parsing and passing down to frontend -fsanitize-recover and -fsanitize-undefined-trap-on-error flags. Simplify parsing -f(no-)sanitize= flags parsing: get rid of too complex filterUnsupportedKinds function. No functionality change. llvm-svn: 222105
* Fix issues missed during the review of r222099.Richard Trieu2014-11-152-17/+18
| | | | | | | Shift some functions around, make a method in Sema private, call the correct overloaded function. No functional change. llvm-svn: 222081
* Fix IRGen for passing transparent unionsReid Kleckner2014-11-152-7/+35
| | | | | | | | | We have had a test for this for a long time with a FIXME saying what we should be doing. This just does it. Fixes PR21573. llvm-svn: 222074
* CGDebugInfo: Update for DIBuilder API changeDuncan P. N. Exon Smith2014-11-151-5/+7
| | | | | | Tracking LLVM commit r222070. llvm-svn: 222071
* This patch fixes couple of bugs for predefined expressionFariborz Jahanian2014-11-144-14/+33
| | | | | | | | | used inside blocks. It fixes a crash in naming code for __func__ etc. when used in a block declared globally. It also brings back old naming convention for predefined expression which was broken. rdar://18961148 llvm-svn: 222065
* [c++1z] Support [[deprecated]] attributes on namespaces. Note that it only ↵Aaron Ballman2014-11-146-9/+62
| | | | | | applies to situations where the namespace is mentioned. Thus, use on anonymous namespaces is diagnosed. llvm-svn: 222054
OpenPOWER on IntegriCloud