summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Attach maximum function count to Module when using PGO modeEaswaran Raman2015-12-121-0/+3
| | | | | | | | | This sets the maximum entry count among all functions in the program to the module using module flags. This allows the optimizer to use this information. Differential Revision: http://reviews.llvm.org/D15163 llvm-svn: 255397
* [modules] If the semantic and lexical DC of a decl are the same, write out theRichard Smith2015-12-112-17/+32
| | | | | | | second one as 0 instead of writing the same bits to the module file twice. This typically reduces PCM file size by about 1%. llvm-svn: 255384
* Allow non-defining declarations of class template partial specializations toRichard Smith2015-12-111-1/+6
| | | | | | | | | have a nested name specifier. Strictly speaking, forward declarations of class template partial specializations are not permitted at all, but that seems like an obvious wording defect, and if we allow them without a nested name specifier we should also allow them with a nested name specifier. llvm-svn: 255383
* Reapply "[Modules] Fix regression when an elaborated-type-specifier mentions ↵Ben Langmuir2015-12-111-0/+7
| | | | | | | | | a hidden tag" Now not trying to use a C++ lookup mechanism in C (d'oh). Unqualified lookup is actually fine for this case in C. llvm-svn: 255377
* Unify diagnostics for type defintitions in bad contextsReid Kleckner2015-12-111-15/+11
| | | | | | | The message for a type definition in an "if" condition was different from the other three for no particular reason. llvm-svn: 255372
* Error on redeclaring with a conflicting asm label and on redeclaring with an ↵Nick Lewycky2015-12-111-1/+16
| | | | | | asm label after the first ODR-use. Detects problems like the one in PR22830 where gcc and clang both compiled the file but with different behaviour. llvm-svn: 255371
* [OpenCL 2.0] In OpenCL v2.0 s6.5 all pointers are implicitly in genericAnastasia Stulova2015-12-112-4/+16
| | | | | | | | | | | address space unless address space is explicitly specified. Correct the behavior of NULL constant detection - generic AS void pointer should be accepted as a valid NULL constant. http://reviews.llvm.org/D15293 llvm-svn: 255346
* Reverting r255337 as it seems to kill bots. Needs investigation.Anastasia Stulova2015-12-112-16/+4
| | | | llvm-svn: 255339
* [OpenCL 2.0] In OpenCL v2.0 s6.5 all pointers are implicitly in genericAnastasia Stulova2015-12-112-4/+16
| | | | | | | | | | | address space unless address space is explicitly specified. Correct the behavior of NULL constant detection - generic AS void pointer should be accepted as a valid NULL constant. http://reviews.llvm.org/D15293 llvm-svn: 255337
* Driver: add multilibs for ARM EBSaleem Abdulrasool2015-12-111-0/+12
| | | | | | | | This improves the coverage for the multilib directories used for ARM. Also add tests covering the internal triple (thumbv7-*). The Juno board can be run in this configuration. llvm-svn: 255328
* Correctly type-check the default arguments of local functionsJohn McCall2015-12-111-2/+5
| | | | | | | | when eagerly instantiating them. rdar://23721638 llvm-svn: 255325
* Revert "[Modules] Fix regression when an elaborated-type-specifier mentions ↵Ben Langmuir2015-12-111-6/+4
| | | | | | | | | | a hidden tag" This is causing assertion failures; reverting until I can fix. This reverts commit r255267 llvm-svn: 255324
* Clean ExprConstant/CGExprConstant up a bit. NFC.George Burgess IV2015-12-112-14/+16
| | | | llvm-svn: 255314
* [VFS] Fix status() of opened redirected fileBen Langmuir2015-12-101-22/+28
| | | | | | | | | | | | | | | Make RedirectedFileSystem::openFilForRead(path)->status() the same as RedirectedFileSystem::status(path). Previously we would just get the status of the underlying real file, which would not have the IsVFSMapped bit set. This fixes rebuilding a module that has an include that is relative to the includer where we will lookup the real path of that file before we lookup the VFS location. rdar://problem/23640339 llvm-svn: 255312
* In Objective-C, ignore attempts to redefine the ARC/GC qualifier macros.John McCall2015-12-101-0/+24
| | | | | | | | | | | | | | This works around existing system headers which unconditionally redefine these macros. This is reasonably safe to do because we used to warn about it anyway (outside of system headers). Continue to warn if the redefinition would have changed the expansion. Still permit redefinition if the macro is explicitly #undef'ed first. rdar://23788307 llvm-svn: 255311
* Objective-C properties: merge attributes when redeclaring 'readonly' as ↵Douglas Gregor2015-12-102-94/+159
| | | | | | | | | | | | | | 'readwrite' in an extension. r251874 stopped back-patching the AST when an Objective-C 'readonly' property is redeclared in a class extension as 'readwrite'. However, it did not properly handle merging of Objective-C property attributes (e.g., getter name, ownership, atomicity) to the redeclaration, leading to bad metadata. Merge (and check!) those property attributes so we get the right metadata and reasonable ASTs. Fixes rdar://problem/23823989. llvm-svn: 255309
* [Sema] Replace pointer-to-map with a map. NFC.George Burgess IV2015-12-101-12/+6
| | | | llvm-svn: 255288
* Do not generate DW_TAG_imported_module for anonymous namespaces (even ↵Ekaterina Romanova2015-12-105-31/+41
| | | | | | | | | | nested) for all the platforms except PS4. For PS4, generate explicit import for anonymous namespaces and mark it by DW_AT_artificial attribute. Differential Revision: http://reviews.llvm.org/D12624 llvm-svn: 255281
* [Modules] Fix regression when an elaborated-type-specifier mentions a hidden tagBen Langmuir2015-12-101-4/+6
| | | | | | | | | This makes non-C++ languages find the same decl as C++ does to workaround a regression introduced in r252960. rdar://problem/23784203 llvm-svn: 255267
* [NFC] Improve a comment from my previous commit (r255221)Faisal Vali2015-12-101-1/+1
| | | | llvm-svn: 255244
* [analyzer] Fix symbolic element index lifetime.Artem Dergachev2015-12-104-7/+62
| | | | | | | | | | | | SymbolReaper was destroying the symbol too early when it was referenced only from an index SVal of a live ElementRegion. In order to test certain aspects of this patch, extend the debug.ExprInspection checker to allow testing SymbolReaper in a direct manner. Differential Revision: http://reviews.llvm.org/D12726 llvm-svn: 255236
* [Sema] Use UnaryOperatorKind and BinaryOperatorKind in parameter lists ↵Craig Topper2015-12-102-22/+17
| | | | | | instead of just unsigned. Removes a few explicit casts. NFC llvm-svn: 255232
* Add parentheses to suppress a -Wparentheses warning.Craig Topper2015-12-101-2/+2
| | | | llvm-svn: 255231
* [OPENMP] Fixed processing of predetermined data-sharing attributesAlexey Bataev2015-12-101-33/+17
| | | | | | Predetermined data-shared attributes for local variables are now considered as implicit. Also, patch prohibits changin of DSA for static memebers of classes. llvm-svn: 255229
* Fix PR24694 (CWG1591): Deducing array bound and element type from ↵Faisal Vali2015-12-101-13/+52
| | | | | | | | | | | | | | | initializer list https://llvm.org/bugs/show_bug.cgi?id=24694 http://wg21.link/cwg1591 Teach DeduceFromInitializerList in SemaTemplateDeduction.cpp to deduce against array (constant and dependent sized) parameters (really, reference to arrays since they don't decay to pointers), by checking if the template parameter is either one of those kinds of arrays, and if so, deducing each initializer list element against the element type, and then deducing the array bound if needed. In brief, this patch enables the following code: template<class T, int N> int *f(T (&&)[N]); int *ip = f({1, 2, 3}); llvm-svn: 255221
* [MSVC] Fix for http://llvm.org/PR25636: indexed accessor property not ↵Alexey Bataev2015-12-101-3/+26
| | | | | | | | | supported correctly. All problems described in http://llvm.org/PR25636 are implemented except for return value of the 'put' property. This patch fixes this problem with the indexed properties Differential Revision: http://reviews.llvm.org/D15174 llvm-svn: 255218
* Mark MS inline ASM 'nodplicate' it it has labels (PR23715)Hans Wennborg2015-12-101-0/+9
| | | | | | | | Duplicating it can lead to labels being defined twice. Differential revision: http://reviews.llvm.org/D15399 llvm-svn: 255201
* PR25416: Improve performance of processing inline assembly consisting of manyRichard Smith2015-12-102-13/+44
| | | | | | | | | | implicitly-concatenated string literals. When looking for the start of a token in the inline assembly, start from the end of the previous token, not the start of the entire string. Patch by Yunlian Jiang! llvm-svn: 255198
* Fix crash on invalid initialization with std::initializer_listReid Kleckner2015-12-091-1/+2
| | | | | | | It is possible for CheckListElementTypes to fail without filling in any initializer list elements. llvm-svn: 255176
* Objective-C properties: loosen 'atomic' checking for readonly properties.Douglas Gregor2015-12-091-20/+53
| | | | | | | | | | | | | | | r251874 reworked the way we handle properties declared within Objective-C class extensions, which had the effective of tightening up property checking in a number of places. In this particular class of cases, we end up complaining about "atomic" mismatches between an implicitly-atomic, readonly property and a nonatomic, readwrite property, which doesn't make sense because "atomic" is essentially irrelevant to readonly properties. Therefore, suppress this diagnostic when the readonly property is implicitly atomic. Fixes rdar://problem/23803109. llvm-svn: 255174
* fix typos; NFCSanjay Patel2015-12-091-1/+1
| | | | llvm-svn: 255163
* unique_ptrify some collections in FileManagerDavid Blaikie2015-12-091-16/+10
| | | | llvm-svn: 255129
* [Hexagon] Use integrated assembler by defaultKrzysztof Parzyszek2015-12-091-0/+3
| | | | llvm-svn: 255127
* Reformat linefeeds.NAKAMURA Takumi2015-12-092-7/+2
| | | | llvm-svn: 255098
* Revert r255001, "Add parse and sema for OpenMP distribute directive and all ↵NAKAMURA Takumi2015-12-0913-278/+12
| | | | | | | | its clauses excluding dist_schedule." It causes memory leak. Some tests in test/OpenMP would fail. llvm-svn: 255094
* [Basic] Rangify two for loops. NFC.Vedant Kumar2015-12-091-4/+4
| | | | llvm-svn: 255091
* [PPC64, TSAN] Enable thread sanitizer for PPC64Bill Schmidt2015-12-081-1/+1
| | | | | | | | Patch by Simone Atzeni. This enables the -fsanitize=thread flag for PPC64 and PPC64LE. llvm-svn: 255067
* Objective-C properties: fix bogus use of "isa<>" on a QualType.Douglas Gregor2015-12-081-6/+5
| | | | | | | | | The code used "isa" to check the type and then "getAs" to look through sugar; we need to look through the sugar when checking, too, otherwise any kind of sugar (nullability qualifiers in the example; or a typedef) will thwart this semantic check. Fixes rdar://problem/23804250. llvm-svn: 255066
* Module file extensions: pass a Sema through to the extension writer.Douglas Gregor2015-12-083-4/+7
| | | | | | | | Module file extensions are likely to need access to Sema/Preprocessor/ASTContext, and cannot get it through other sources. llvm-svn: 255065
* [Sema] Add warning when comparing nonnull and nullGeorge Burgess IV2015-12-081-28/+45
| | | | | | | | | | | | | | | | | | Currently, we emit warnings in some cases where nonnull function parameters are compared against null. This patch extends this support to warn when comparing the result of `returns_nonnull` functions against null. More specifically, we will now warn cases like: int *foo() __attribute__((returns_nonnull)); int main() { if (foo() == NULL) {} // warning: will always evaluate to false } Differential Revision: http://reviews.llvm.org/D15324 llvm-svn: 255058
* Use range loops and autos in lib/Serialization/ASTWriter.cpp.Eugene Zelenko2015-12-081-127/+103
| | | | | | Differential revision: http://reviews.llvm.org/D15311 llvm-svn: 255033
* [x86][avx512] more changes in intrinsics to be align with gcc formatAsaf Badouh2015-12-082-16/+16
| | | | | | Differential Revision: http://reviews.llvm.org/D15328 llvm-svn: 255012
* [OPENMP 4.5] Parsing/sema for 'num_tasks' clause.Alexey Bataev2015-12-089-2/+114
| | | | | | OpenMP 4.5 adds directives 'taskloop' and 'taskloop simd'. These directives support clause 'num_tasks'. Patch adds parsing/semantic analysis for this clause. llvm-svn: 255008
* [Sema] Remove tab characters. NFCCraig Topper2015-12-081-2/+2
| | | | llvm-svn: 255004
* Add parse and sema for OpenMP distribute directive and all its clauses ↵Carlo Bertolli2015-12-0813-12/+278
| | | | | | excluding dist_schedule. llvm-svn: 255001
* Explicitly permit undefined behavior in constant initializers for globalRichard Smith2015-12-082-7/+42
| | | | | | | | variables in C, in the cases where we can constant-fold it to a value regardless (such as floating-point division by zero and signed integer overflow). Strictly enforcing this rule breaks too much code. llvm-svn: 254992
* Replace a bunch of duplicate conditions with the call from types::.Eric Christopher2015-12-081-10/+4
| | | | llvm-svn: 254986
* Remove name from FIXME.Eric Christopher2015-12-081-1/+1
| | | | llvm-svn: 254985
* [diagnostics] Avoid crashes while printing macro backtracesReid Kleckner2015-12-081-19/+64
| | | | | | | | | | | | | | | | | | | When attempting to map a source into a given level of macro expansion, this code was ignoring the possibility that the start and end of the range might take wildly different paths through the tree of macro expansions. It was assuming that the begin spelling location would always precede the end spelling location, which is false. A macro can easily transpose its arguments. This also fixes a related issue where there are extra macro arguments between the begin location and the end location. In this situation, we now highlight the entire macro invocation. Pair programmed with Richard Smith. Fixes PR12818. llvm-svn: 254981
* 80-column fixup.Eric Christopher2015-12-081-1/+2
| | | | llvm-svn: 254973
OpenPOWER on IntegriCloud