summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Devirtualize EHScopeStack::Cleanup's dtor because it's never destroyed ↵David Blaikie2015-08-1813-44/+44
| | | | | | polymorphically llvm-svn: 245378
* Fix for MSVCDavid Blaikie2015-08-181-1/+1
| | | | llvm-svn: 245368
* Wdeprecated: Support movability of EHScopeStack::Cleanup objects as they are ↵David Blaikie2015-08-181-0/+5
| | | | | | move constructed in ConditionalCleanup::restore llvm-svn: 245367
* Range-based-for-convert some loops in ASTWriter. No functionality change ↵Richard Smith2015-08-182-35/+32
| | | | | | intended. llvm-svn: 245361
* [autoconf] Fixing reversed logic introduced r245304.Chris Bieneman2015-08-181-1/+1
| | | | | | Thanks for the catch Hal! llvm-svn: 245359
* Workaround -Wdeprecated on SemDiagnosticConsumer's tricksy copy ctor.David Blaikie2015-08-181-0/+8
| | | | llvm-svn: 245352
* Initialize the AST consumer as soon as we have both an ASTConsumer and anRichard Smith2015-08-187-24/+23
| | | | | | | ASTContext. Fixes some cases where we could previously initialize the AST consumer more than once. llvm-svn: 245346
* [sanitizer] Add -lutil to static runtime link flags.Evgeniy Stepanov2015-08-182-0/+8
| | | | | | | This is needed to prevent breakage of -Wl,-as-needed link when interceptors for functions in libutil are added. See PR15823. llvm-svn: 245344
* Revert r245323, it caused PR24493.Nico Weber2015-08-183-175/+48
| | | | llvm-svn: 245342
* Simplify Diagnostic's ctors a bit by using in-class initializers for its membersDavid Blaikie2015-08-181-7/+6
| | | | llvm-svn: 245339
* Add AST narrowing matchers for inline and anonymous namespaces. Since the ↵Aaron Ballman2015-08-184-4504/+4597
| | | | | | inline keyword can also be specified on a FunctionDecl, this is a polymorphic matcher. llvm-svn: 245337
* Removing useless whitespace; NFC.Aaron Ballman2015-08-181-1/+0
| | | | llvm-svn: 245332
* Make __builtin_object_size always answer correctlyGeorge Burgess IV2015-08-183-48/+175
| | | | | | | | | | | | | | | | | __builtin_object_size would return incorrect answers for many uses where type=3. This fixes the inaccuracy by making us emit 0 instead of LLVM's objectsize intrinsic. Additionally, there are many cases where we would emit suboptimal (but correct) answers, such as when arrays are involved. This patch fixes some of these cases (please see new tests in test/CodeGen/object-size.c for specifics on which cases are improved) Patch mostly by Richard Smith. Differential Revision: http://reviews.llvm.org/D12000 This fixes PR15212. llvm-svn: 245323
* Update to reflect the library set in LLVM changing.Chandler Carruth2015-08-181-1/+0
| | | | llvm-svn: 245320
* We shouldn't need to pass -fno-strict-aliasing when building clang with clang.Chris Bieneman2015-08-182-2/+8
| | | | | | | | | | | | Summary: The code comments in the Makefile indicate this was put in place to support issues when building clang with GCC. Today clang's strict aliasing works, so we shouldn't pass -fno-strict-aliasing when building with clang. Reviewers: bogner, echristo Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D12036 llvm-svn: 245304
* [TreeTransform] Simplify code. No functionality change.Benjamin Kramer2015-08-181-3/+1
| | | | llvm-svn: 245271
* [OPENMP 4.1] Allow variables with reference types in private clauses.Alexey Bataev2015-08-1849-222/+230
| | | | | | OpenMP 4.1 allows to use variables with reference types in all private clauses (private, firstprivate, lastprivate, linear etc.). Patch allows to use such variables and fixes codegen for linear variables with reference types. llvm-svn: 245268
* Revert "Generating assumption loads of vptr after ctor call (fixed)"Justin Bogner2015-08-1813-426/+129
| | | | | | | | | | | Bootstrap bots were failing: http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_build/6382/ http://bb.pgr.jp/builders/clang-3stage-i686-linux/builds/2969 This reverts r245264. llvm-svn: 245267
* Generating assumption loads of vptr after ctor call (fixed)Piotr Padlewski2015-08-1813-129/+426
| | | | | | | | | | | | | | | Generating call assume(icmp %vtable, %global_vtable) after constructor call for devirtualization purposes. For more info go to: http://lists.llvm.org/pipermail/cfe-dev/2015-July/044227.html Edit: Fixed version because of PR24479. http://reviews.llvm.org/D11859 llvm-svn: 245264
* Revert r245257 "Generating assumption loads of vptr after ctor call"Hans Wennborg2015-08-1812-425/+128
| | | | | | It caused PR24479 llvm-svn: 245260
* Doxygen: add build option to use svg instead of png files for graphsHans Wennborg2015-08-173-1/+11
| | | | | | Differential Revision: http://reviews.llvm.org/D11994 llvm-svn: 245259
* Generating assumption loads of vptr after ctor callPiotr Padlewski2015-08-1712-128/+425
| | | | | | | | | | | | Generating call assume(icmp %vtable, %global_vtable) after constructor call for devirtualization purposes. For more info go to: http://lists.llvm.org/pipermail/cfe-dev/2015-July/044227.html http://reviews.llvm.org/D11859 llvm-svn: 245257
* Remove dead code, there's no need for an override that just duplicatesEric Christopher2015-08-171-2/+0
| | | | | | the default behavior. llvm-svn: 245251
* Make a test less brittle.Richard Trieu2015-08-171-44/+56
| | | | | | Capture line numbers in a variable for FileCheck instead of hardcoding them. llvm-svn: 245250
* [modules] When parsing the base specifiers of a parse-merged class, the currentRichard Smith2015-08-175-15/+30
| | | | | | | | context is the class itself but lookups should be performed starting with the lookup parent of the class (class and base members don't shadow types from the surrounding context because they have not been declared yet). llvm-svn: 245236
* [modules] PR20507: Avoid silent textual inclusion.Sean Silva2015-08-1716-10/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: If a module was unavailable (either a missing requirement on the module being imported, or a missing file anywhere in the top-level module (and not dominated by an unsatisfied `requires`)), we would silently treat inclusions as textual. This would cause all manner of crazy and confusing errors (and would also silently "work" sometimes, making the problem difficult to track down). I'm really not a fan of the `M->isAvailable(getLangOpts(), getTargetInfo(), Requirement, MissingHeader)` function; it seems to do too many things at once, but for now I've done things in a sort of awkward way. The changes to test/Modules/Inputs/declare-use/module.map were necessitated because the thing that was meant to be tested there (introduced in r197805) was predicated on silently falling back to textual inclusion, which we no longer do. The changes to test/Modules/Inputs/macro-reexport/module.modulemap are just an overlooked missing header that seems to have been missing since this code was committed (r213922), which is now caught. Reviewers: rsmith, benlangmuir, djasper Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D10423 llvm-svn: 245228
* [clang-tidy] Make NumOccurrenceFlag for SourcePaths configurable.Alexander Kornienko2015-08-172-4/+24
| | | | | | | | | | | | Added an additional ctor that takes a NumOccurrenceFlag parameter for the SourcePaths option. This frees applications from always having to pass at least one source file, e.g., -list-checks. http://reviews.llvm.org/D12069 Patch by Don Hinton! llvm-svn: 245204
* [modules] When explicitly building a module file, don't include timestamps inRichard Smith2015-08-1711-37/+63
| | | | | | | the produced pcm file for stable file creation across distributed build systems. llvm-svn: 245199
* Enable passing test on Windows + MSYS.Yaron Keren2015-08-161-1/+0
| | | | llvm-svn: 245184
* [Sema] Be consistent about diagnostic wording: always use "cannot".Davide Italiano2015-08-1513-105/+105
| | | | | | Discussed with Richard Smith. llvm-svn: 245162
* Tiny cleanup: move some Triple variables up to the top of theJames Y Knight2015-08-151-21/+27
| | | | | | function, and remove a duplicate var. llvm-svn: 245154
* [MS ABI] Switch catchpad/cleanuppad to use tokensDavid Majnemer2015-08-153-19/+22
| | | | llvm-svn: 245153
* clangStaticAnalyzerCheckers: Update libdesp.NAKAMURA Takumi2015-08-151-0/+1
| | | | llvm-svn: 245145
* Delay emitting members of dllexport classes until the class is fully parsed ↵Hans Wennborg2015-08-156-43/+126
| | | | | | | | | | | | | | | | | (PR23542) This enables Clang to correctly handle code such as: struct __declspec(dllexport) S { int x = 42; }; where it would otherwise error due to trying to generate the default constructor before the in-class initializer for x has been parsed. Differential Revision: http://reviews.llvm.org/D11850 llvm-svn: 245139
* [modules] Stop dropping 'module.timestamp' files into the current directoryRichard Smith2015-08-154-8/+27
| | | | | | when building with implicit modules disabled. llvm-svn: 245136
* clarified test commentNaomi Musgrave2015-08-141-1/+2
| | | | llvm-svn: 245124
* [CONCEPTS] Add diagnostic; invalid tag when concept specifiedNathan Wilson2015-08-143-2/+20
| | | | | | | | | | | | Summary: Adding check to emit diagnostic for invalid tag when concept is specified and associated tests. Reviewers: rsmith, hubert.reinterpretcast, fraggamuffin, faisalv, aaron.ballman Subscribers: aaron.ballman, cfe-commits Differential Revision: http://reviews.llvm.org/D11916 llvm-svn: 245123
* [analyzer] Add checkers for OS X / iOS localizability issuesAnna Zaks2015-08-145-0/+933
| | | | | | | | | | | | | | | Add checkers that detect code-level localizability issues for OS X / iOS: - A path sensitive checker that warns about uses of non-localized NSStrings passed to UI methods expecting localized strings. - A syntax checker that warns against not including a comment in NSLocalizedString macros. A patch by Kulpreet Chilana! (This is the second attempt with the compilation issue on Windows and the random test failures resolved.) llvm-svn: 245093
* WindowsX86: long double is x87DoubleExtended on mingwMartell Malone2015-08-141-2/+8
| | | | | | | | | | | | | | | | Summary: long double on x86 mingw is 80bits and is aligned to 16bytes Fixes: https://llvm.org/bugs/show_bug.cgi?id=24398 Reviewers: rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D12037 llvm-svn: 245084
* Don't run explicit-modules-missing-files.cpp on WindowsReid Kleckner2015-08-141-0/+3
| | | | | | | | | | | It is flaky due to inability to remove files with open handles. We could paper over it with rm -f, but then the file would still be present. This is more evidence to me that we should roll our own 'rm' implementation in LLVM. llvm-svn: 245083
* Windows ARM: ignore calling conventions as described on MSDNMartell Malone2015-08-143-3/+24
| | | | | | | | | | | | | | | | | | Summary: MSDN says that fastcall, stdcall, thiscall, and vectorcall are all accepted but ignored on ARM and X64. https://msdn.microsoft.com/en-us/library/984x0h58.aspx MSDN also says cdecl is also accepted and typically ignored This patch brings ARM in line with how we ignore them for X64 Reviewers: rnk Subscribers: compnerd, cfe-commits Differential Revision: http://reviews.llvm.org/D12034 llvm-svn: 245076
* Represent 2 parallel string arrays as one string[][2] array.Douglas Katzman2015-08-141-19/+19
| | | | | | Differential Revision: http://reviews.llvm.org/D11991 llvm-svn: 245063
* [ASTContext] Call APValue destructors for MaterializedTemporaryValuesDavid Majnemer2015-08-141-0/+4
| | | | | | Hopefully this makes the sanitizer build bot happy. llvm-svn: 245054
* [Sema] main can't be declared as global variable, in C++.Davide Italiano2015-08-144-0/+142
| | | | | | | | | | | So, we now reject that. We also warn for any external-linkage global variable named main in C, because it results in undefined behavior. PR: 24309 Differential Revision: http://reviews.llvm.org/D11658 Reviewed by: rsmith llvm-svn: 245051
* clang-format: Don't remove space between #elif and parentheses.Daniel Jasper2015-08-143-1/+7
| | | | | | | | | | Before: #elif(AAAA && BBBB) After: #elif (AAAA && BBBB) llvm-svn: 245043
* [OPENMP] Fix for http://llvm.org/PR24371: Assert failure compiling blender 2.75.Alexey Bataev2015-08-1411-64/+267
| | | | | | | blender uses statements expression in condition of the loop under control of the '#pragma omp parallel for'. This condition is used several times in different expressions required for codegen of the loop directive. If there are some variables defined in statement expression, it fires an assert during codegen because of redefinition of the same variables. We have to rebuild several expression to be sure that all variables are unique. llvm-svn: 245041
* Fix AST matcher documentation.Manuel Klimek2015-08-143-87/+250
| | | | | | | | | | | Fix a bug in the matcher docs where callExpr(on(...)) was in the examples, but didn't work (on() only works for memberCallExpr). Fix a bug in the doc dump script that was introduced in r231575 when removing a regexp capture without adapting the code that uses the captures. llvm-svn: 245040
* Add structed way to express command line options in the compilation database.Manuel Klimek2015-08-143-31/+77
| | | | | | | | | | | | | | | | | | | | Currently, arguments are passed via the string attribute 'command', assuming a shell-escaped / quoted command line to extract the original arguments. This works well enough on Unix systems, but turns out to be problematic for Windows tools to generate. This CL adds a new attribute 'arguments', an array of strings, which specifies the exact command line arguments. If 'arguments' is available in the compilation database, it is preferred to 'commands'. Currently there is no plan to retire 'commands': there are enough different use cases where users want to create their own mechanism for creating compilation databases, that it doesn't make sense to force them all to implement shell command line parsing. Patch by Daniel Dilts. llvm-svn: 245036
* [modules] Add an experimental -cc1 feature to embed the contents of an inputRichard Smith2015-08-149-9/+55
| | | | | | | | | | | file in the .pcm files. This allows a smaller set of files to be sent to a remote build worker when building with explicit modules (for instance, module map files need not be sent along with the corresponding precompiled modules). This doesn't actually make the embedded files visible to header search, so it's not useful as a packaging format for public header files. llvm-svn: 245028
* unique_ptrify ConsumedBlockInfo analysis to make it move assignableDavid Blaikie2015-08-142-87/+75
| | | | | | | | | ConsumedBlockInfo objects were move assigned, but only in a state where the dtor was a no-op anyway. Subtle and easily could've happened in ways that wouldn't've been safe - so this change makes it safe no matter what state the ConsumedBlockInfo object is in. llvm-svn: 244998
OpenPOWER on IntegriCloud