summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Run dos2unix on ms-intrinsics-rotations.c test. NFCBruno Cardoso Lopes2017-06-211-171/+171
| | | | llvm-svn: 305874
* [ODRHash] Supply more information when generic error message is emitted.Richard Trieu2017-06-212-0/+16
| | | | llvm-svn: 305872
* Prevent devirtualization of calls to un-instantiated functions.Sunil Srivastava2017-06-206-2/+89
| | | | | | | | PR 27895 Differential Revision: https://reviews.llvm.org/D22057 llvm-svn: 305862
* Special-case handling of destructors in override lists when dumping ASTs.Lang Hames2017-06-201-3/+6
| | | | | | | Fixes a bug in r305850: CXXDestructors don't have names, so we need to handle printing of them separately. llvm-svn: 305860
* Preserve CXX method overrides in ASTImporterLang Hames2017-06-203-9/+59
| | | | | | | | | | | | | | Summary: The ASTImporter should import CXX method overrides from the source context when it imports a method decl. Reviewers: spyffe, rsmith, doug.gregor Reviewed By: spyffe Differential Revision: https://reviews.llvm.org/D34371 llvm-svn: 305850
* [clang] Fix format specifiers fixits for nested macrosAlexander Shaposhnikov2017-06-203-15/+48
| | | | | | | | | | | | | | ExpansionLoc was previously calculated incorrectly in the case of nested macros expansions. In this diff we build the stack of expansions where the last one is the actual expansion which should be used for grouping together the edits. The definition of MacroArgUse is adjusted accordingly. Test plan: make check-all Differential revision: https://reviews.llvm.org/D34268 llvm-svn: 305845
* [AArch64] ADD ARMv.2-A FP16 vector intrinsicsAbderrazek Zaafrani2017-06-2010-363/+2355
| | | | | | Differential Revision: https://reviews.llvm.org/D34161 llvm-svn: 305820
* Fix for Bug 33471: Preventing operator auto from resolving to a template ↵Erich Keane2017-06-202-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | operator. As the bug report says, struct A { template<typename T> operator T(); }; void foo() { A().operator auto(); } causes: "undeduced type in IR-generation UNREACHABLE executed at llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp:208!" The problem is that in this case, "T" is being deduced as "auto", which I believe is incorrect. The 'operator auto' implementation in Clang is standards compliant, however there is a defect report against core (1670). Differential Revision: https://reviews.llvm.org/D34370 llvm-svn: 305812
* [GSoC] Flag value completion for clangYuka Takahashi2017-06-206-21/+94
| | | | | | | | | | | | This is patch for GSoC project, bash-completion for clang. To use this on bash, please run `source clang/utils/bash-autocomplete.sh`. bash-autocomplete.sh is code for bash-completion. In this patch, Options.td was mainly changed in order to add value class in Options.inc. llvm-svn: 305805
* Add a missing '[' to the tests from r305719Alex Lorenz2017-06-202-2/+2
| | | | | | This clarifies the tests as the missing ']' is important, and not the '['. llvm-svn: 305804
* Split the expectations in tests from r305719 over multiple lines toAlex Lorenz2017-06-202-2/+7
| | | | | | | | enhance readability As suggested by Duncan Exon Smith! llvm-svn: 305803
* D31187: Fix removal of out-of-line definitions.Vassil Vassilev2017-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | Consider: struct MyClass { void f() {} } MyClass::f(){} // expected error redefinition of f. #1 Some clients (eg. cling) need to call removeDecl for the redefined (#1) decl. This patch enables us to remove the lookup entry is registered in the semantic decl context and not in the primary decl context of the lexical decl context where we currently are trying to remove it from. It is not trivial to test this piece and writing a full-blown unit test seems too much. llvm-svn: 305799
* [OpenCL] Diagnose scoped address-space qualified variablesAnastasia Stulova2017-06-203-2/+24
| | | | | | | | | | | | Produce an error if variables qualified with a local or a constant address space are not declared in the outermost scope of a kernel. Patch by Simon Perretta. Differential Revision: https://reviews.llvm.org/D34024 llvm-svn: 305798
* [preprocessor] When preprocessor option 'SingleFileParseMode' is enabled, ↵Argyrios Kyrtzidis2017-06-206-27/+179
| | | | | | | | | | parse all directive blocks if the condition uses undefined macros This is useful for being able to parse the preprocessor directive blocks even if the header, that defined the macro that is checked, hasn't been included. Differential Revision: https://reviews.llvm.org/D34263 llvm-svn: 305797
* [OpenCL] Fix OpenCL and SPIR version metadata generation.Alexey Bader2017-06-204-49/+46
| | | | | | | | | | | | | | Summary: OpenCL and SPIR version metadata must be generated once per module instead of once per mangled global value. Reviewers: Anastasia, yaxunl Reviewed By: Anastasia Subscribers: ahatanak, cfe-commits Differential Revision: https://reviews.llvm.org/D34235 llvm-svn: 305796
* [analyzer] Teach CloneDetection about Qt Meta-Object Compiler to filter auto ↵Leslie Zhai2017-06-203-4/+4
| | | | | | | | | | | | generated files Reviewers: v.g.vassilev, teemperor Reviewed By: teemperor Differential Revision: https://reviews.llvm.org/D34353 llvm-svn: 305774
* [analyzer] Check NULL pointer dereference issue for memset functionLeslie Zhai2017-06-202-2/+110
| | | | | | | | | | Reviewers: dcoughlin, zaks.anna, NoQ, danielmarjamaki Reviewed By: NoQ, danielmarjamaki Differential Revision: https://reviews.llvm.org/D31868 llvm-svn: 305773
* Add a subgroup of c++1z-compat to enable and disable the warning aboutAkira Hatanaka2017-06-203-3/+6
| | | | | | | | | | c++17's non-throwing exception specification in function signature. rdar://problem/32628743 Differential Revision: https://reviews.llvm.org/D34251 llvm-svn: 305772
* Turn off "disable free" mode when preprocessing imported module files inRichard Smith2017-06-201-0/+1
| | | | | | | | | -frewrite-imports mode. This could end up accumulating a very large amount of intermediate state. Clear it out after each module file is processed. llvm-svn: 305764
* Support non-identifier module names when preprocessing modules.Richard Smith2017-06-198-60/+119
| | | | llvm-svn: 305758
* [docs] Coverage: Improve the wording a bitVedant Kumar2017-06-191-3/+3
| | | | llvm-svn: 305745
* [docs] Coverage: document issue with the BFD linkerVedant Kumar2017-06-191-0/+5
| | | | llvm-svn: 305743
* Typo fix: appropo -> apropos. NFC.Aaron Ballman2017-06-191-4/+4
| | | | llvm-svn: 305738
* [Clang] Handle interaction of -pg and no_instrument_function attribute.Manoj Gupta2017-06-192-18/+27
| | | | | | | | | | | | | | | | | | | | | | Summary: Disable generation of counting-function attribute if no_instrument_function attribute is present in function. Interaction between -pg and no_instrument_function is the desired behavior and matches gcc as well. This is required for fixing a crash in Linux kernel when function tracing is enabled. Fixes PR33515. Reviewers: hfinkel, rengolin, srhines, hans Reviewed By: hfinkel Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D34357 llvm-svn: 305728
* [Parser][ObjC] Use an artificial EOF token while parsing lexed ObjC methodsAlex Lorenz2017-06-193-1/+53
| | | | | | | | | | | This change avoid a crash that occurred when skipping to EOF while parsing an ObjC interface/implementation. rdar://31963299 Differential Revision: https://reviews.llvm.org/D34185 llvm-svn: 305719
* CodeGen: Cast temporary variable to proper address spaceYaxun Liu2017-06-198-57/+102
| | | | | | | | | | | | | | | | In C++ all variables are in default address space. Previously change has been made to cast automatic variables to default address space. However that is not sufficient since all temporary variables need to be casted to default address space. This patch casts all temporary variables to default address space except those for passing indirect arguments since they are only used for load/store. This patch only affects target having non-zero alloca address space. Differential Revision: https://reviews.llvm.org/D33706 llvm-svn: 305711
* clang-format: Fix C99 designated initializers corner casesFrancois Ferrand2017-06-194-6/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This fixes the missing space before the designated initializer when `Cpp11BracedListStyle=false` : const struct A a = { .a = 1, .b = 2 }; ^ Also, wrapping between opening brace and designated array initializers used to have an excessive penalty (like breaking between an expression and the subscript operator), leading to unexpected wrapping: const struct Aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaa = {[1] = aaaaaaaaaaaaaaaaaaaaaaaaaaa, [2] = bbbbbbbbbbbbbbbbbbbbbbbbbbb}; instead of: const struct Aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaa = { [1] = aaaaaaaaaaaaaaaaaaaaaaaaaaa, [2] = bbbbbbbbbbbbbbbbbbbbbbbbbbb}; Finally, designated array initializers are not binpacked, just like designated member initializers. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, krasimir, klimek Differential Revision: https://reviews.llvm.org/D33491 llvm-svn: 305696
* Revert "[NFC] Refactor DiagnosticRenderer to use FullSourceLoc"Christof Douma2017-06-199-377/+363
| | | | | | | This reverts commit 305684. This patch breaks extra/tools/clang-tidy llvm-svn: 305688
* Move the test from r305678 to a separte file with 'REQUIRES: system-darwin'Alex Lorenz2017-06-192-9/+10
| | | | | | Otherwise it will fail on non-macOS systems. llvm-svn: 305685
* [NFC] Refactor DiagnosticRenderer to use FullSourceLocChristof Douma2017-06-199-363/+377
| | | | | | | | | | | | | | | | Move the DiagnosticRenderer and its dependents to using FullSourceLocs instead of a SourceLocation and SourceManager pointer. The changeset is rather large but entirely mechanical. This is step one to allow DiagnosticRenderer to take either llvm::SMLocs or clang::SourceLocations. Patch by Sanne Wouda Review: https://reviews.llvm.org/D31709 Change-Id: If351a112cdf6718e2d3ef6721b8da9c6376b32dd llvm-svn: 305684
* Add missing OS check to r305678Alex Lorenz2017-06-191-2/+4
| | | | | | | That commit failed on non-macOS buildbots as I've forgotten to make sure that the system on which Clang is running on is actually macOS. llvm-svn: 305680
* [driver][macOS] Pick the system version for the deployment targetAlex Lorenz2017-06-192-1/+29
| | | | | | | | | | | | | | if the SDK is newer than the system This commit improves the driver by making sure that it picks the system version for the deployment target when the version of the macOS SDK is newer than the system version. rdar://29449467 Differential Revision: https://reviews.llvm.org/D34175 llvm-svn: 305678
* [analyzer] Fix logical not for pointers with different bit widthDaniel Marjamaki2017-06-193-3/+14
| | | | | | Differential Revision: https://reviews.llvm.org/D31029 llvm-svn: 305669
* clang-format: Improve understanding of combined typedef+record declarationsDaniel Jasper2017-06-192-2/+13
| | | | | | | | | | Fixes an issue where struct A { int X; }; would be broken onto multiple lines, but typedef struct A { int X; } A2; was collapsed onto a single line. Patch by Jacob Bandes-Storch. Thank you. llvm-svn: 305667
* clang-format: Handle "if constexpr".Daniel Jasper2017-06-194-2/+78
| | | | | | | | | | | | | | | | | | | | c++1z adds the following constructions to the language: if constexpr (cond) statement1; else if constexpr (cond) statement2; else if constexpr (cond) statement3; else statement4; A first version of this was proposed in reviews.llvm.org/D26953 by Francis Visoiu Mistrih, but never commited. This patch additionally fixes the behavior when allowing short if statements on a single line and was authored by Jacob Bandes-Storch. Thank you to both authors. llvm-svn: 305666
* clang-format: Add capability to format the diff on save in vim.Daniel Jasper2017-06-192-2/+25
| | | | | | | | | | | With this patch, one can configure a BufWrite hook that will make the clang-format integration compute a diff of the current buffer with the file that's on disk and format all changed lines. This should create a zero-overhead auto-format solution that doesn't require the file to already be clang-format clean to avoid spurious diffs. Review: https://reviews.llvm.org/D32429 llvm-svn: 305665
* [analyzer] Teach CloneDetection about Qt Meta-Object CompilerLeslie Zhai2017-06-198-2/+136
| | | | | | | | | | Reviewers: v.g.vassilev, zaks.anna, NoQ, teemperor Reviewed By: v.g.vassilev, zaks.anna, NoQ, teemperor Differential Revision: https://reviews.llvm.org/D31320 llvm-svn: 305659
* CodeGen: make the type match the comment for a libcallSaleem Abdulrasool2017-06-172-1/+17
| | | | | | | | Fix the type for a (runtime) library call to match both the comment and the runtime implementation. As it happens, the type being used matched, this just makes it more precise. llvm-svn: 305638
* Call setMustBuildLookupTable on TagDecls in ExternalASTMergerLang Hames2017-06-173-0/+8
| | | | | | | | | | | | | | | | | | | | Summary: setMustBuildLookupTable should be called on imported TagDecls otherwise we may fail to import their member decls (if they have any). Not calling the setMustBuildLookupTable method results in a failure in the attached test case when lookup for the 'x' member fails on struct S, which hasn't had its decls imported elsewhere. (By contrast the member-in-struct testcase hasn't run into this issue because the import of its decls is triggered when the struct instance is defined, and the member access follows this). Reviewers: spyffe, rsmith Reviewed By: spyffe, rsmith Differential Revision: https://reviews.llvm.org/D34253 llvm-svn: 305619
* [Driver] Do a PATH lookup if needed when using -no-canonical-prefixesPetr Hosek2017-06-161-2/+9
| | | | | | | | | | | | | When -no-canonical-prefixes option is used and argv0 contains only a program name, we need to do a PATH lookup to get an executable path, otherwise the return value won't be a valid path and any subsequent uses of it (e.g. when invoking -cc1) will fail with an error. This patch fixes PR9576. Differential Revision: https://reviews.llvm.org/D34290 llvm-svn: 305600
* [index] Fix typo: inferface -> interfaceMarc-Andre Laperle2017-06-162-2/+2
| | | | | | | | | | | | Reviewers: arphaman Reviewed By: arphaman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33253 llvm-svn: 305588
* Killing a tab and some other spurious whitespace; NFC.Aaron Ballman2017-06-161-1/+1
| | | | llvm-svn: 305586
* [PR33394] Avoid lexing editor placeholders when Clang is used onlyAlex Lorenz2017-06-164-41/+64
| | | | | | | | | | | | | | | | for preprocessing r300667 added support for editor placeholder to Clang. That commit didn’t take into account that users who use Clang for preprocessing only (-E) will get the "editor placeholder in source file" error when preprocessing their source (PR33394). This commit ensures that Clang doesn't lex editor placeholders when running a preprocessor only action. rdar://32718000 Differential Revision: https://reviews.llvm.org/D34256 llvm-svn: 305576
* Ignore return value in test.Daniel Jasper2017-06-161-1/+1
| | | | llvm-svn: 305574
* [ubsan] docs: Add a note about pointers to volatileVedant Kumar2017-06-161-0/+6
| | | | llvm-svn: 305568
* Fix a bug that warnings generated with -M or -MM flagsYuka Takahashi2017-06-162-0/+15
| | | | | | | | | This is a patch for bug: https://bugs.llvm.org/show_bug.cgi?id=6817 Warnings should not be emitted with -M and -MM flags, because this mode is only used for generate MakeFiles. llvm-svn: 305561
* Expand vector oparation to as IR constants, PR28129.Dinar Temirbulatov2017-06-162-0/+69
| | | | llvm-svn: 305551
* [ubsan] PR33081: Skip the standard type checks for volatileVedant Kumar2017-06-162-0/+12
| | | | | | | | | | Skip checks for null dereference, alignment violation, object size violation, and dynamic type violation if the pointer points to volatile data. Differential Revision: https://reviews.llvm.org/D34262 llvm-svn: 305546
* [XRay][clang] Support capturing the implicit `this` argument to C++ class ↵Dean Michael Berris2017-06-162-6/+15
| | | | | | | | | | | | | | | | | | member functions Summary: Before this change, we couldn't capture the `this` pointer that's implicitly the first argument of class member functions. There are some interesting things we can do with capturing even just this single argument for zero-argument member functions. Reviewers: rnk, pelikan Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D34052 llvm-svn: 305544
* [ODRHash] Hash VarDecl members.Richard Trieu2017-06-164-8/+326
| | | | | | | These VarDecl's are static data members of classes. Since the initializers are also hashed, this also provides checking for default arguments to methods. llvm-svn: 305543
OpenPOWER on IntegriCloud