summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Extended list of valid frontend options with '-cl-std=CL2.0'.Anastasia Stulova2014-11-201-2/+5
| | | | | | | This option sets language mode for the compilation of a source file to be OpenCL v2.0. Example: clang -cc1 -cl-std=CL2.0 myfile.cl llvm-svn: 222444
* Testing commit access.Anastasia Stulova2014-11-201-1/+1
| | | | llvm-svn: 222438
* Remove now dead code.Frederic Riss2014-11-201-7/+0
| | | | | | | | After LLVM r222434, the Variables field of DISubprograms for forward declarations will always be null. No need to keep code around to delete them. llvm-svn: 222437
* Prepare for the DIBuilder populating DISubprogram's Variables with null.Frederic Riss2014-11-201-1/+2
| | | | | | | | | | | This is a followup to r222373. A better solution to the problem solved there is to not create the leaked nodes at all (we know that they will never be used for forward declared functions anyway). To avoid bot breakage in the interval between the cfe and llvm commits, add a check that the nMDNode is not null before deleting it. This code can completely go away after the LLVM part is in. llvm-svn: 222433
* Replace variadic operator function pointer with an enum value.Samuel Benzaquen2014-11-203-19/+59
| | | | | | | | | | | | | | | Summary: Replace variadic operator function pointer with an enum value. Hiding the implementation of the variadic matcher will allow to specialize them for the operation performed. In particular, it will allow for a more efficient allOf() matcher. Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D6293 llvm-svn: 222432
* clang-format: [Java] Don't align after "return".Daniel Jasper2014-11-201-1/+2
| | | | | | | | | | | | | | | | | | Doesn't seem to be common practice in Java. Before: return aaaaaaaaaaaaaaaaaaa && bbbbbbbbbbbbbbbbbbb && ccccccccccccccccccc; After: return aaaaaaaaaaaaaaaaaaa && bbbbbbbbbbbbbbbbbbb && ccccccccccccccccccc; Patch by Harry Terkelsen. llvm-svn: 222424
* clang-format: [Java] Don't force break before generic type method.Daniel Jasper2014-11-201-0/+1
| | | | | | | | | | | | | | | Before: Foo.bar() .<X> baz(); After: Foo.bar() .<X>baz(); Patch by Harry Terkelsen. llvm-svn: 222423
* [OPENMP] Codegen for "omp flush" directive.Alexey Bataev2014-11-203-5/+39
| | | | | | | | For each "omp flush" directive a call to "void kmpc_flush(ident_t *, ...)" function is generated. Directive "omp flush" may have an associated list of variables to flush, but currently runtime function ignores them. So the patch generates just "call kmpc_flush(ident_t *<loc>, i32 0)". Differential Revision: http://reviews.llvm.org/D6292 llvm-svn: 222409
* [CMake] Use .svn/wc.db as our VC dependency if it's available.Jordan Rose2014-11-201-6/+10
| | | | | | | | | | | In order to keep SVNVersion.inc from being regenerated on every build, we need to specify as a dependency a file that only changes when the VC state updates. I previously just had .svn/entries, but that's only used by Subversion 1.6. 1.7 uses .svn/wc.db instead; prefer that if it's present. (Thanks, Nico!) llvm-svn: 222407
* Preserve numeric literal suffixes during type canonicalization.Richard Smith2014-11-201-0/+2
| | | | | | Patch by Pierre Gousseau! Test cases altered significantly by me. llvm-svn: 222404
* When mangling member-expressions, skip implicit accesses of anonymous unionRichard Smith2014-11-201-0/+12
| | | | | | objects. This is consistent with GCC's behavior. Patch by Tomasz Miąsko! llvm-svn: 222402
* PR21531: fix crash on invalid with unexpanded pack in case value.Richard Smith2014-11-201-8/+13
| | | | llvm-svn: 222400
* clang-format: [Java] Accept generic types in enum declarationDaniel Jasper2014-11-191-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Before: enum Foo implements Bar<X, Y> { ABC { ... } , CDE { ... }; } After: enum Foo implements Bar<X, Y> { ABC { ... }, CDE { ... }; } Patch by Harry Terkelsen. llvm-svn: 222394
* [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-191-3/+3
| | | | | | No functionality change. llvm-svn: 222392
* Fix bug where a trivial constexpr copy/move operation couldn't copy from anRichard Smith2014-11-191-4/+31
| | | | | | | 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-191-4/+18
| | | | | | | | | 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-191-1/+1
| | | | | | Fix a typo in the search path identified by Justin Bogner. llvm-svn: 222371
* clang-format: [Java] Ignore C++-specific keywordsDaniel Jasper2014-11-191-0/+5
| | | | | | | | | | | | | | | | | | 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-192-4/+20
| | | | | | | | | | | | | | | | | | | | | 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-1936-123/+137
| | | | | | 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-191-2/+9
| | | | | | for C code. llvm-svn: 222327
* clang-format a recent commit I madeDavid Blaikie2014-11-195-11/+11
| | | | 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-1911-113/+100
| | | | llvm-svn: 222306
* Update for LLVM API changeDavid Blaikie2014-11-194-5/+5
| | | | llvm-svn: 222303
* clang-format: Add option to disable alignment after opening bracketsDaniel Jasper2014-11-183-7/+17
| | | | | | | | | | | | | | 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-181-0/+2
| | | | | | | | | | | | | | 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
* [Sema] Patch to issue warning on comparing parameters withFariborz Jahanian2014-11-183-1/+54
| | | | | | | | | | | 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
* [OPENMP] Additional processing of 'omp atomic read' directive.Alexey Bataev2014-11-184-13/+103
| | | | | | 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-181-0/+12
| | | | | | | | | | | | | | | | | | 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-181-0/+8
| | | | | | module file. llvm-svn: 222224
* Fully handle globals and functions in CGDebugInfo::getDeclarationOrDefinition()Frederic Riss2014-11-182-11/+95
| | | | | | | | | | | | | | | | | | | | 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-181-3/+5
| | | | | | | | | | | | | 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
* Fix an assertion when ending a function definition.John McCall2014-11-181-1/+2
| | | | | | | | | | | | | | | | | | | | 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-175-45/+26
| | | | | | | | | | | | | | | | | | 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-175-65/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-171-15/+4
| | | | | | | | | | 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-171-1/+1
| | | | | | | | | | Before: Constructor() : a(a), b(c, d *e) {} After: Constructor() : a(a), b(c, d * e) {} llvm-svn: 222158
* 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
* 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-173-8/+9
| | | | | | | | | | | | | | | | | | | 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
OpenPOWER on IntegriCloud