summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* SemaExprCXX.cpp: Try to fix \param in r237608. [-Wdocumentation]NAKAMURA Takumi2015-05-191-2/+1
| | | | llvm-svn: 237668
* [AST] Put VarDeclBitfields on a dietDavid Majnemer2015-05-193-21/+20
| | | | | | | | VarDeclBitfields contained bits which are never present in parameters. Split these out so that ParmVarDeclBitfields wouldn't grow past 32-bits if another field was added. llvm-svn: 237648
* [modules] Support for merging a parsed definition of a static data member of ↵Richard Smith2015-05-191-14/+33
| | | | | | a class template into an imported but hidden definition. llvm-svn: 237647
* Fix indentationDavid Blaikie2015-05-181-43/+43
| | | | llvm-svn: 237631
* Revert changes to DefaultABIInfo accidentally introduced in r208733Reid Kleckner2015-05-181-1/+9
| | | | | | | | | | | | Also add trivial handling of transparent unions. PPC32, MSP430, and XCore apparently all rely on DefaultABIInfo. This should worry you, because DefaultABIInfo is not implementing the rules of any particular ABI. Fixes PR23097, patch by Andy Gibbs. llvm-svn: 237630
* API update for streamlining of IRBuilder::CreateCall to just use ↵David Blaikie2015-05-1814-108/+109
| | | | | | ArrayRef/initializer_list+braced init llvm-svn: 237625
* [modules] Support for merging a parsed class template specialization ↵Richard Smith2015-05-182-3/+13
| | | | | | definition into an imported but hidden definition. llvm-svn: 237612
* [modules] When a file is listed as a non-textual header in a module map, don'tRichard Smith2015-05-181-5/+4
| | | | | | | | | | enter it more than once, even if it doesn't have #include guards -- we already know that it is intended to have the same effect every time it's included, and it's already had that effect. This particularly helps with local submodule visibility builds, where the include guard macro may not be visible in the includer, but will become visible the moment we enter the included file. llvm-svn: 237609
* Detect uses of mismatching forms of 'new' and 'delete'Ismail Pazarbasi2015-05-185-10/+332
| | | | | | | | | | | | | | | | | Emit warning when operand to `delete` is allocated with `new[]` or operand to `delete[]` is allocated with `new`. rev 2 update: `getNewExprFromInitListOrExpr` should return `dyn_cast_or_null` instead of `dyn_cast`, since `E` might be null. Reviewers: rtrieu, jordan_rose, rsmith Subscribers: majnemer, cfe-commits Differential Revision: http://reviews.llvm.org/D4661 llvm-svn: 237608
* Have -Wredundant-move ignore reference types.Richard Trieu2015-05-181-0/+3
| | | | | | | Don't give a warning when the type being moved is a reference type. Also uncomment two lines in the test case. llvm-svn: 237607
* clang-format: Fix another regression caused by r237565.Daniel Jasper2015-05-182-7/+10
| | | | | | | | | | | | | | | | | | | | Before: class C : test { class D : test{void f(){int i{2}; } } ; } ; After: class C : test { class D : test { void f() { int i{2}; } }; }; llvm-svn: 237569
* clang-format: Fix regression introduced by r237565.Daniel Jasper2015-05-181-1/+2
| | | | | | | | | | | | | | Before: class C : public D { SomeClass SC { 2 }; }; After: class C : public D { SomeClass SC{2}; }; llvm-svn: 237568
* clang-format: Improve detection of macros annotating functions.Daniel Jasper2015-05-183-21/+17
| | | | | | | | | | | | | | | | Before: ASSERT("aaaaaaaaaaaaaaa") << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa << bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; After: ASSERT("aaaaaaaaaaaaaaa") << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa << bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; Also cleanup implementation a bit and only mark closing parenthesis of these annotations. llvm-svn: 237567
* clang-format: Allow braced initializers in template arguments of classDaniel Jasper2015-05-182-12/+14
| | | | | | | | | | | | | | specializations. Before: template <class T> struct S < std::is_arithmetic<T> { } > {}; After: template <class T> struct S<std::is_arithmetic<T>{}> {}; llvm-svn: 237565
* clang-format: Support function annotations in macros.Daniel Jasper2015-05-183-3/+24
| | | | | | | | | | | | Before: DEPRECATED("Use NewClass::NewFunction instead.") string OldFunction(const string &parameter) {} After: DEPRECATED("Use NewClass::NewFunction instead.") string OldFunction(const string &parameter) {} llvm-svn: 237562
* [OPENMP] Fix for '#pragma omp task' codegen.Alexey Bataev2015-05-182-71/+109
| | | | | | | | | | | | | | | | | | Internal task structure must be generated like typedef struct kmp_task { void * shareds; kmp_routine_entry_t routine; kmp_int32 part_id; kmp_routine_entry_t destructors; } kmp_task_t; struct kmp_task_t_with_privates { kmp_task_t task_data; .kmp_private. privates; }; to avoid possible additional alignment bytes in first fields (shareds, routine, part_id and destructors). Runtime library is not aware of such kind additional alignment bytes. llvm-svn: 237561
* [modules] Move implicit creation of ImportDecls for #includes transformed ↵Richard Smith2015-05-182-20/+20
| | | | | | into module imports from the frontend into Sema where it belongs. llvm-svn: 237555
* [clang-cl] Enable C++14 when targeting 2015 compatibilityDavid Majnemer2015-05-181-2/+11
| | | | llvm-svn: 237553
* [modules] Refactor and simplify #include handling.Richard Smith2015-05-181-115/+102
| | | | | | | Fix a tiny bug where we'd try to load a module file for the module we're in the middle of building. llvm-svn: 237552
* [modules] If we see a #include that maps to a module, but use of precompiled ↵Richard Smith2015-05-182-24/+25
| | | | | | modules is disabled, track submodule visibility anyway if -fmodules-local-submodule-visibility is enabled. This, in effect, gives modules semantics but without precompilation. llvm-svn: 237550
* Wrap to 80 columns. No behavior change.Nico Weber2015-05-181-1/+2
| | | | llvm-svn: 237549
* [MS ABI] Give __attribute__((overloadable)) functions pretty namesDavid Majnemer2015-05-181-2/+9
| | | | | | | | It turns out that there is a mangling for 'extern "C"', it's only used by MSVC in /clr mode. Co-opt this mangling so that extern "C" functions marked overloadable get demangled nicely. llvm-svn: 237548
* [MS ABI] Function encodings are always encoded in template argumentsDavid Majnemer2015-05-181-9/+14
| | | | llvm-svn: 237547
* Fix confusing indent. No behavior change.Nico Weber2015-05-181-1/+1
| | | | llvm-svn: 237546
* clang-format: Properly align ObjC string literals.Daniel Jasper2015-05-171-8/+9
| | | | | | | | | | | | | | | | | | | | | | Before: NSString s = @"a" "b" "c"; NSString s = @"a" @"b" @"c"; After: NSString s = @"a" "b" "c"; NSString s = @"a" @"b" @"c"; This fixes llvm.org/PR23536. llvm-svn: 237538
* clang-format: Improve line wrapping around << operators.Daniel Jasper2015-05-171-1/+2
| | | | | | | | | | | | | | | | | | Generally, clang-format tries to keep label-value pairs on a single line for stream operators. However, we should not do that if there is just a single such pair, as that doesn't help much. Before: llvm::errs() << "aaaaaaaaaaaa: " << aaaaaaa(aaaaaaaaa, aaaaaaaaa); After: llvm::errs() << "aaaaaaaaaaaa: " << aaaaaaa(aaaaaaaaa, aaaaaaaaa); Also remove old test case that was testing actual behavior any more. llvm-svn: 237535
* [Sema] Improve llvm_unreachable() message.Davide Italiano2015-05-171-1/+1
| | | | llvm-svn: 237532
* Don't leak TemplateIds when a plugin parses late-parsed templates at TU end.Nico Weber2015-05-171-20/+29
| | | | | | | | | | | | | | | | | | | | | | | | | In -fdelayed-template-parsing mode, templates that aren't used are not parsed at all. For some diagnostic plugins, this is a problem since they want to analyse the contents of the template function body. What has been suggested on cfe-dev [1] is to explicitly parse interesting templates in HandleTranslationUnit(); IWYU does this for example [2]. This is workable, but since the delayed parsing doesn't run below a call to ParseTopLevelDecl(), no DestroyTemplateIdAnnotationsRAIIObj object is on the stack to clean up TemplateIds that are created during parsing. To fix this, let ~Parser() clean them up in delayed template parsing mode instead of leaking (or asserting in +Assert builds). (r219810, relanded in r220400, fixed the same problem in incremental processing mode; the review thread of r219810 has a good discussion of the problem.) To test this, give the PrintFunctionNames plugin a flag to force parsing of a template and add a test that uses it in -fdelayed-template-parsing mode. Without the Parser.cpp change, that test asserts. 1: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-August/038415.html 2: https://code.google.com/p/include-what-you-use/source/detail?r=566 llvm-svn: 237531
* Wrap a few comments to 80 columns.Nico Weber2015-05-161-4/+7
| | | | llvm-svn: 237529
* [Sema] Fold array into for-range loop. No functional change intended.Benjamin Kramer2015-05-161-16/+14
| | | | llvm-svn: 237525
* [modules] Retain the name as written for umbrella headers and directories, ↵Richard Smith2015-05-167-61/+64
| | | | | | rather than converting to an absolute path. No observable change expected, but this allows us to correctly compute the module for an umbrella header, which later changes will require. llvm-svn: 237508
* When emitting a dropped qualifier error, show which qualifiers are dropped.Richard Trieu2015-05-161-3/+10
| | | | llvm-svn: 237505
* [PPC64] Add vector pack/unpack support from ISA 2.07Bill Schmidt2015-05-162-0/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the following new instructions in the Power ISA 2.07: vpksdss vpksdus vpkudus vpkudum vupkhsw vupklsw These instructions are available through the vec_packs, vec_packsu, vec_unpackh, and vec_unpackl built-in interfaces. These are lane-sensitive instructions, so the built-ins have different implementations for big- and little-endian, and the instructions must be marked as killing the vector swap optimization for now. The first three instructions perform saturating pack operations. The fourth performs a modulo pack operation, which means it can be represented with a vector shuffle, and conversely the appropriate vector shuffles may cause this instruction to be generated. The other instructions are only generated via built-in support for now. I noticed during patch preparation that the macro __VSX__ was not previously predefined when the power8-vector or direct-move features are requested. This is an error, and I've corrected that here as well. Appropriate tests have been added. There is a companion patch to llvm for the rest of this support. llvm-svn: 237500
* Reverse the order of types in the reference dropping qualifiers error.Richard Trieu2015-05-151-1/+1
| | | | | | | | The error has the form ... 'int' ... 'const int' ... dropped qualifiers. At first glance, it appears that the const qualifier is added. Reverse the types so that the second type is less qualified than the first. llvm-svn: 237482
* Use llvm::StringSwitch<std::string> to take advantage of implicit asserting ↵Peter Collingbourne2015-05-151-4/+2
| | | | | | conversion to std::string. llvm-svn: 237475
* [modules] Add local submodule visibility support for declarations.Richard Smith2015-05-1518-93/+293
| | | | | | | | | | | | With this change, enabling -fmodules-local-submodule-visibility results in name visibility rules being applied to submodules of the current module in addition to imported modules (that is, names no longer "leak" between submodules of the same top-level module). This also makes it much safer to textually include a non-modular library into a module: each submodule that textually includes that library will get its own "copy" of that library, and so the library becomes visible no matter which including submodule you import. llvm-svn: 237473
* Implement no_sanitize attribute.Peter Collingbourne2015-05-153-25/+58
| | | | | | Differential Revision: http://reviews.llvm.org/D9631 llvm-svn: 237463
* CGAtomic.cpp: Fix bogus \brief(s). Did you mean "\param"? [-Wdocumentation]NAKAMURA Takumi2015-05-151-3/+3
| | | | llvm-svn: 237447
* Limit set of types instantiated in FindInstantiatedDecl.Serge Pavlov2015-05-152-6/+27
| | | | | | | | Starting from r236426 FindInstantiatedDecl may instantiate types that are referenced before definition. This change limit the set of types that can be instantiated by this function. llvm-svn: 237434
* clang-format: Slightly change format decisions around macro annotations.Daniel Jasper2015-05-151-1/+1
| | | | | | | | | | | | Before: bool aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa GUARDED_BY(aaaaaaaaaaaa) = aaaaaaaaaaaaaaaaaaaaaaaaa; After: bool aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa GUARDED_BY(aaaaaaaaaaaa) = aaaaaaaaaaaaaaaaaaaaaaaaa; llvm-svn: 237430
* clang-format: Don't use column layout in lists that have separatingDaniel Jasper2015-05-151-5/+7
| | | | | | | | comments. At some point, we might to want to a layout with a different number of columns instead, but at the moment, this causes more confusion than it's worth. llvm-svn: 237427
* clang-format: Add missing space before ObjC selector.Daniel Jasper2015-05-151-1/+6
| | | | | | | | | | Before: [self aaaaa:(1 + 2)bbbbb:3]; After: [self aaaaa:(1 + 2) bbbbb:3]; llvm-svn: 237424
* [OPENMP] Fixed bug in atomic update/capture/write constructs.Alexey Bataev2015-05-152-131/+280
| | | | | | Fixed a bug with codegen for destination atomic l-value with padding and junk in this padding bytes. llvm-svn: 237422
* Revert r237385, "[CodeGen] Reuse stack space from unused function results"NAKAMURA Takumi2015-05-151-20/+3
| | | | | | It broke clang stage2, at least tblgen. llvm-svn: 237418
* Refactor: when exposing a definition in some module, provide listeners with theRichard Smith2015-05-153-10/+10
| | | | | | module rather than requiring them to work it out themselves. llvm-svn: 237416
* Add flag to enable native half typePirama Arumuga Nainar2015-05-141-1/+1
| | | | | | | | | | | | | | | | | | | Summary: r235215 enables support in LLVM for legalizing f16 type in the IR. AArch64 already had support for this. r235215 and some backend patches brought support for ARM, X86, X86-64, Mips and Mips64. This change exposes the LangOption 'NativeHalfType' in the command line, so the backend legalization can be used if desired. NativeHalfType is enabled for OpenCL (current behavior) or if '-fnative-half-type' is set. Reviewers: olista01, steven_wu, ab Subscribers: cfe-commits, srhines, aemerson Differential Revision: http://reviews.llvm.org/D9781 llvm-svn: 237406
* Fix Clang -Wsequence-pointDavid Blaikie2015-05-141-1/+1
| | | | llvm-svn: 237401
* InstrProf: Only disable coverage in built-in macros, not all system macrosJustin Bogner2015-05-141-4/+9
| | | | | | | | | The issue I was trying to solve in r236547 was about built-in macros, but I disabled coverage in all system macros. This is actually a bit of overkill, and makes the display of coverage around system macros degrade unnecessarily. Instead, limit this to builtins specifically. llvm-svn: 237397
* Tweak availability checking to look through typedef declarations.Ted Kremenek2015-05-141-2/+18
| | | | llvm-svn: 237396
* Revert "Detect uses of mismatching forms of 'new' and 'delete'"Diego Novillo2015-05-145-332/+10
| | | | | | | | | This reverts commit 742dc9b6c9686ab52860b7da39c3a126d8a97fbc. This is generating multiple segfaults in our internal builds. Test case coming up shortly. llvm-svn: 237391
OpenPOWER on IntegriCloud