summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* [CLANG][BPF] change __builtin_preserve_access_index() signatureYonghong Song2019-09-195-7/+40
| | | | | | | | | | | | | | | | | | | | | | | The clang intrinsic __builtin_preserve_access_index() currently has signature: const void * __builtin_preserve_access_index(const void * ptr) This may cause compiler warning when: - parameter type is "volatile void *" or "const volatile void *", or - the assign-to type of the intrinsic does not have "const" qualifier. Further, this signature does not allow dereference of the builtin result pointer as it is a "const void *" type, which adds extra step for the user to do type casting. Let us change the signature to: PointerT __builtin_preserve_access_index(PointerT ptr) such that the result and argument types are the same. With this, directly dereferencing the builtin return value becomes possible. Differential Revision: https://reviews.llvm.org/D67734 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372294 91177308-0d34-0410-b5e6-96231b3b80d8
* Initialize all fields in ABIArgInfo.Serge Guelton2019-09-191-6/+4
| | | | | | | | | | | Due to usage of an uninitialized fields, we end up with a Conditional jump or move depends on uninitialised value Fixes https://bugs.llvm.org/show_bug.cgi?id=40547 Commited on behalf of Martin Liska <mliska@suse.cz> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372281 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] PR43102: Fix an assertion and an out-of-bounds error for ↵Kristof Umann2019-09-183-8/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | diagnostic location construction Summary: https://bugs.llvm.org/show_bug.cgi?id=43102 In today's edition of "Is this any better now that it isn't crashing?", I'd like to show you a very interesting test case with loop widening. Looking at the included test case, it's immediately obvious that this is not only a false positive, but also a very bad bug report in general. We can see how the analyzer mistakenly invalidated `b`, instead of its pointee, resulting in it reporting a null pointer dereference error. Not only that, the point at which this change of value is noted at is at the loop, rather then at the method call. It turns out that `FindLastStoreVisitor` works correctly, rather the supplied explodedgraph is faulty, because `BlockEdge` really is the `ProgramPoint` where this happens. {F9855739} So it's fair to say that this needs improving on multiple fronts. In any case, at least the crash is gone. Full ExplodedGraph: {F9855743} Reviewers: NoQ, xazax.hun, baloghadamsoftware, Charusso, dcoughlin, rnkovacs, TWeaver Subscribers: JesperAntonsson, uabelho, Ka-Ka, bjope, whisperity, szepet, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66716 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372269 91177308-0d34-0410-b5e6-96231b3b80d8
* fix build, adjust test also for Windows path separatorLubos Lunak2019-09-182-2/+2
| | | | | | Introduced in 1e9c1d2b7bfc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372263 91177308-0d34-0410-b5e6-96231b3b80d8
* On PowerPC, Secure-PLT by default for FreeBSD 13 and higherDimitry Andric2019-09-181-1/+2
| | | | | | | | | | | | | | | | | | | Summary: In https://svnweb.freebsd.org/changeset/base/349351, FreeBSD 13 and higher transitioned to Secure-PLT for PowerPC. This part contains the changes in clang's PPC architecture defaults. Reviewers: emaste, jhibbits, hfinkel Reviewed By: jhibbits Subscribers: wuzish, nemanjai, krytarowski, kbarton, MaskRay, jsji, shchenz, steven.zhang, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67119 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372261 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP]Fix for PR43349: Crash for privatized loop bound.Alexey Bataev2019-09-182-2/+20
| | | | | | | | If the variable, used in the loop boundaries, is not captured in the construct, this variable must be considered as undefined if it was privatized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372252 91177308-0d34-0410-b5e6-96231b3b80d8
* actually also compile output in tests for -frewrite-includesLubos Lunak2019-09-1811-61/+74
| | | | | | | | | Checking that the created output matches something is nice, but this should also check whether the output makes sense. Differential Revision: https://reviews.llvm.org/D63979 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372250 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-format][PR41899] PointerAlignment: Left leads to useless space in ↵Paul Hoad2019-09-182-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | lambda intializer expression Summary: https://bugs.llvm.org/show_bug.cgi?id=41899 ```auto lambda = [&a = a]() { a = 2; };``` is formatted as ```auto lambda = [& a = a]() { a = 2; };``` With an extra space if PointerAlignment is set to Left > The space "& a" looks strange when there is no type in the lambda's intializer expression. This can be worked around with by setting "PointerAlignment: Right", but ideally "PointerAlignment: Left" would not add a space in this case. Reviewers: klimek, owenpan, krasimir, timwoj Reviewed By: klimek Subscribers: cfe-commits Tags: #clang-tools-extra, #clang Differential Revision: https://reviews.llvm.org/D67718 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372249 91177308-0d34-0410-b5e6-96231b3b80d8
* make -frewrite-includes also rewrite conditions in #if/#elifLubos Lunak2019-09-184-129/+207
| | | | | | | | | | | | | | | Those conditions may use __has_include, which needs to be rewritten. The existing code has already tried to rewrite just __has_include, but it didn't work with macro expansion, so e.g. Qt's "#define QT_HAS_INCLUDE(x) __has_include(x)" didn't get handled properly. Since the preprocessor run knows what each condition evaluates to, just rewrite the entire condition. This of course requires that the -frewrite-include pass has the same setup as the following compilation, but that has always been the requirement. Differential Revision: https://reviews.llvm.org/D63508 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372248 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sema] Suppress -Wformat diagnostics for bool types when printed using %hhdErik Pilkington2019-09-184-0/+67
| | | | | | | | | | | Also, add a diagnostic under -Wformat for printing a boolean value as a character. rdar://54579473 Differential revision: https://reviews.llvm.org/D66856 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372247 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-format][PR41964] Fix crash with SIGFPE when TabWidth is set to 0 and ↵Paul Hoad2019-09-184-17/+99
| | | | | | | | | | | | | | | | | | | | | | | | | line starts with tab Summary: clang-format 8.0 crashes with SIGFPE (floating point exception) when formatting following file: app.cpp: void a() { //line starts with '\t' } $ clang-format -style='{TabWidth: 0}' app.cpp Reviewers: owenpan, klimek, russellmcc, timwoj Reviewed By: klimek Subscribers: cfe-commits Tags: #clang-tools-extra, #clang Differential Revision: https://reviews.llvm.org/D67670 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372246 91177308-0d34-0410-b5e6-96231b3b80d8
* [c++20] P1331R2: Allow transient use of uninitialized objects inRichard Smith2019-09-1814-192/+446
| | | | | | constant evaluation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372237 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP5.0]Allow multiple context selectors in the context selectorAlexey Bataev2019-09-189-125/+172
| | | | | | | | | sets. According to OpenMP 5.0, context selector set might include several context selectors, separated with commas. Patch fixes this problem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372235 91177308-0d34-0410-b5e6-96231b3b80d8
* Recommit -r372180Erich Keane2019-09-181-30/+179
| | | | | | | | | | | | | | | | | | Commit message below, original caused the sphinx build bot to fail, this one should fix it. Create UsersManual section entitled 'Controlling Floating Point Behavior' Create a new section for documenting the floating point options. Move all the floating point options into this section, and add new entries for the floating point options that exist but weren't previously described in the UsersManual. Patch By: mibintc Differential Revision: https://reviews.llvm.org/D67517 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372229 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r372082 "[Clang] Pragma vectorize_width() implies vectorize(enable)"Hans Wennborg2019-09-183-38/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This broke the Chromium build. Consider the following code: float ScaleSumSamples_C(const float* src, float* dst, float scale, int width) { float fsum = 0.f; int i; #if defined(__clang__) #pragma clang loop vectorize_width(4) #endif for (i = 0; i < width; ++i) { float v = *src++; fsum += v * v; *dst++ = v * scale; } return fsum; } Compiling at -Oz, Clang now warns: $ clang++ -target x86_64 -Oz -c /tmp/a.cc /tmp/a.cc:1:7: warning: loop not vectorized: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering [-Wpass-failed=transform-warning] this suggests it's not actually enabling vectorization hard enough. At -Os it asserts instead: $ build.release/bin/clang++ -target x86_64 -Os -c /tmp/a.cc clang-10: /work/llvm.monorepo/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:2734: void llvm::InnerLoopVectorizer::emitMemRuntimeChecks(llvm::Loop*, llvm::BasicBlock*): Assertion ` !BB->getParent()->hasOptSize() && "Cannot emit memory checks when optimizing for size"' failed. Of course neither of these are what the developer expected from the pragma. > Specifying the vectorization width was supposed to implicitly enable > vectorization, except that it wasn't really doing this. It was only > setting the vectorize.width metadata, but not vectorize.enable. > > This should fix PR27643. > > Differential Revision: https://reviews.llvm.org/D66290 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372225 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips] Pass "xgot" flag as a subtarget featureSimon Atanasyan2019-09-184-9/+19
| | | | | | | | | We need "xgot" flag in the MipsAsmParser to implement correct expansion of some pseudo instructions in case of using 32-bit GOT (XGOT). MipsAsmParser does not have reference to MipsSubtarget but has a reference to "feature bit set". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372220 91177308-0d34-0410-b5e6-96231b3b80d8
* [AST] CommentLexer - Remove (optional) Invalid parameter from getSpelling.Simon Pilgrim2019-09-182-7/+3
| | | | | | The static analyzer noticed that we were dereferencing it even when the default null value was being used. Further investigation showed that we never explicitly set the parameter so I've just removed it entirely. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372217 91177308-0d34-0410-b5e6-96231b3b80d8
* [lldb] Print better diagnostics for user expressions and modulesRaphael Isemann2019-09-182-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently our expression evaluators only prints very basic errors that are not very useful when writing complex expressions. For example, in the expression below the user made a type error, but it's not clear from the diagnostic what went wrong: ``` (lldb) expr printf("Modulos are:", foobar%mo1, foobar%mo2, foobar%mo3) error: invalid operands to binary expression ('int' and 'double') ``` This patch enables full Clang diagnostics in our expression evaluator. After this patch the diagnostics for the expression look like this: ``` (lldb) expr printf("Modulos are:", foobar%mo1, foobar%mo2, foobar%mo3) error: <user expression 1>:1:54: invalid operands to binary expression ('int' and 'float') printf("Modulos are:", foobar%mo1, foobar%mo2, foobar%mo3) ~~~~~~^~~~ ``` To make this possible, we now emulate a user expression file within our diagnostics. This prevents that the user is exposed to our internal wrapper code we inject. Note that the diagnostics that refer to declarations from the debug information (e.g. 'note' diagnostics pointing to a called function) will not be improved by this as they don't have any source locations associated with them, so caret or line printing isn't possible. We instead just suppress these diagnostics as we already do with warnings as they would otherwise just be a context message without any context (and the original diagnostic in the user expression should be enough to explain the issue). Fixes rdar://24306342 Reviewers: JDevlieghere, aprantl, shafik, #lldb Reviewed By: JDevlieghere, #lldb Subscribers: usaxena95, davide, jingham, aprantl, arphaman, kadircet, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65646 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372203 91177308-0d34-0410-b5e6-96231b3b80d8
* [X86] Prevent assertion when calling a function that returns double with ↵Craig Topper2019-09-181-0/+20
| | | | | | | | -mno-sse2 on x86-64. As seen in the most recent updates to PR10498 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372197 91177308-0d34-0410-b5e6-96231b3b80d8
* [Timers] Fix printing some `-ftime-report` sections twice. Fixes PR40328.Volodymyr Sapsai2019-09-183-0/+3
| | | | | | | | | | | | | | | | | | | | | Starting from r324788 timer groups aren't cleared automatically when printed out. As a result some timer groups were printed one more time. For example, "Pass execution timing report" was printed again in `ManagedStatic<PassTimingInfo>` destructor, "DWARF Emission" in `ManagedStatic<Name2PairMap> NamedGroupedTimers` destructor. Fix by clearing timer groups manually. Reviewers: thegameg, george.karpenkov Reviewed By: thegameg Subscribers: aprantl, jkorous, dexonsmith, ributzka, aras-p, cfe-commits Differential Revision: https://reviews.llvm.org/D67683 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372191 91177308-0d34-0410-b5e6-96231b3b80d8
* [ARM] Update clang for removal of vfp2d16 and vfp2d16spEli Friedman2019-09-174-27/+26
| | | | | | | | | | Matching fix for https://reviews.llvm.org/D67375 (r372186). Differential Revision: https://reviews.llvm.org/D67467 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372187 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Create UsersManual section entitled 'Controlling Floating Point"Erich Keane2019-09-171-159/+30
| | | | | | This reverts commit a08d5a4b0ebd44dc64f41049ed4e97a3c6d31498. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372185 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sema] Split of versions of -Wimplicit-{float,int}-conversion for ↵Erik Pilkington2019-09-176-32/+156
| | | | | | | | | | | | | Objective-C BOOL Also, add a diagnostic group, -Wobjc-signed-char-bool, to control all these related diagnostics. rdar://51954400 Differential revision: https://reviews.llvm.org/D67559 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372183 91177308-0d34-0410-b5e6-96231b3b80d8
* Create UsersManual section entitled 'Controlling Floating PointErich Keane2019-09-171-30/+159
| | | | | | | | | | | | | | Behavior' Create a new section for documenting the floating point options. Move all the floating point options into this section, and add new entries for the floating point options that exist but weren't previously described in the UsersManual. Patch By: mibintc Differential Revision: https://reviews.llvm.org/D67517 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372180 91177308-0d34-0410-b5e6-96231b3b80d8
* Ignore exception specifier mismatch when merging redeclarationsReid Kleckner2019-09-172-2/+34
| | | | | | | | | | | | | | | | | | Exception specifiers are now part of the function type in C++17. Normally, it is illegal to redeclare the same function or specialize a template with a different exception specifier, but under -fms-compatibility, we accept it with a warning. Without this change, the function types would not match due to the exception specifier, and clang would claim that the types were "incompatible". Now we emit the warning and merge the redeclaration as we would in C++14 and earlier. Fixes PR42842, which is about compiling _com_ptr_t in C++17. Based on a patch by Alex Fusco <alexfusco@google.com>! Differential Revision: https://reviews.llvm.org/D67590 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372178 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-scan-deps] Add verbose modeJan Korous2019-09-171-2/+9
| | | | | | | | When running in the default mode we don't print anything other than actual output to stdout to make automated processing easier. Differential Revision: https://reviews.llvm.org/D67522 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372174 91177308-0d34-0410-b5e6-96231b3b80d8
* Use 'BOOL' instead of BOOL in diagnostic messagesErik Pilkington2019-09-173-20/+20
| | | | | | Type names should be enclosed in single quotes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372152 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Rework the test, NFC.Alexey Bataev2019-09-171-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372148 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP5.0]Introduce attribute for declare variant directive.Alexey Bataev2019-09-1710-1/+334
| | | | | | | | Added attribute for declare variant directive. It will allow to handle declare variant directive at the codegen and will allow to add extra checks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372147 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP]Try to rework the test to pacify the buildbots, NFC.Alexey Bataev2019-09-171-8/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372130 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-format] Fix cleanup of `AnnotatedLine` to include children nodes.Yitzhak Mandelbaum2019-09-172-13/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: AnnotatedLine has a tree structure, and things like the body of a lambda will be a child of the lambda expression. For example, [&]() { foo(a); }; will have an AnnotatedLine with a child: [&]() {}; '- foo(a); Currently, when the `Cleaner` class analyzes the affected lines, it does not cleanup the lines' children nodes, which results in missed cleanup opportunities, like the lambda body in the example above. This revision extends the algorithm to visit children, thereby fixing the above problem. Patch by Eric Li. Reviewers: krasimir Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67659 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372129 91177308-0d34-0410-b5e6-96231b3b80d8
* Add SpellingNotCalculated to Attribute Enums to suppress UBSan warningsErich Keane2019-09-174-0/+16
| | | | | | | UBSan downstreams noticed that the assignment of SpellingNotCalculated to the spellings caused warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372124 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenCL] Tidy up some comments; NFCSven van Haastregt2019-09-171-10/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372119 91177308-0d34-0410-b5e6-96231b3b80d8
* Hide implementation details in namespaces.Benjamin Kramer2019-09-171-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372113 91177308-0d34-0410-b5e6-96231b3b80d8
* [NFC] Updated testDavid Bolvansky2019-09-171-7/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372095 91177308-0d34-0410-b5e6-96231b3b80d8
* [Clang] Pragma vectorize_width() implies vectorize(enable)Sjoerd Meijer2019-09-173-9/+38
| | | | | | | | | | | | Specifying the vectorization width was supposed to implicitly enable vectorization, except that it wasn't really doing this. It was only setting the vectorize.width metadata, but not vectorize.enable. This should fix PR27643. Differential Revision: https://reviews.llvm.org/D66290 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372082 91177308-0d34-0410-b5e6-96231b3b80d8
* [RISCV] Add option aliases: -mcmodel=medany and -mcmodel=medlowKito Cheng2019-09-172-0/+16
| | | | | | | | | | | | | | RISC-V GCC use -mcmodel=medany and -mcmodel=medlow, but LLVM use -mcmodel=small and -mcmodel=medium. Add those two option aliases for provide same user interface between GCC and LLVM. Reviewed By: lenary Differential Revision: https://reviews.llvm.org/D67066 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372080 91177308-0d34-0410-b5e6-96231b3b80d8
* [RISCV] Define __riscv_cmodel_medlow and __riscv_cmodel_medany correctlyKito Cheng2019-09-172-2/+28
| | | | | | | | | | | | | | RISC-V LLVM was only implement small/medlow code model, so it defined __riscv_cmodel_medlow directly without check. Now, we have medium/medany code model in RISC-V back-end, it should define according the actually code model. Reviewed By: lewis-revill Differential Revision: https://reviews.llvm.org/D67065 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372078 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix reliance on -flax-vector-conversions in AVX intrinsics headers andRichard Smith2019-09-174-16/+16
| | | | | | corresponding tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372063 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix reliance on lax vector conversions in tests for x86 intrinsics.Richard Smith2019-09-178-15/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372062 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove reliance on lax vector conversions from altivec.h in VSX mode.Richard Smith2019-09-175-23/+43
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372061 91177308-0d34-0410-b5e6-96231b3b80d8
* Push lambda scope earlier when transforming lambda expressionNicholas Allegra2019-09-172-4/+19
| | | | | | | | Differential Revision: https://reviews.llvm.org/D66067 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372058 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Fix the test, NFCAlexey Bataev2019-09-171-3/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372055 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP]Fix the test, NFC.Alexey Bataev2019-09-161-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372040 91177308-0d34-0410-b5e6-96231b3b80d8
* [Modules][Objective-C] Use complete decl from module when diagnosing missing ↵Bruno Cardoso Lopes2019-09-166-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | import Summary: Otherwise the definition (first found) for ObjCInterfaceDecl's might precede the module one, which will eventually lead to crash, since diagnoseMissingImport needs one coming from a module. This behavior changed after Richard's r342018, which started to look into the definition of ObjCInterfaceDecls. rdar://problem/49237144 Reviewers: rsmith, arphaman Subscribers: jkorous, dexonsmith, ributzka, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66982 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372039 91177308-0d34-0410-b5e6-96231b3b80d8
* do not emit -Wunused-macros warnings in -frewrite-includes mode (PR15614)Lubos Lunak2019-09-162-2/+6
| | | | | | | | | | | | -frewrite-includes calls PP.SetMacroExpansionOnlyInDirectives() to avoid macro expansions that are useless in that mode, but this can lead to -Wunused-macros false positives. As -frewrite-includes does not emit normal warnings, block -Wunused-macros too. Differential Revision: https://reviews.llvm.org/D65371 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372026 91177308-0d34-0410-b5e6-96231b3b80d8
* [Clang][Codegen] Disable arm_acle.c test.Roman Lebedev2019-09-161-0/+2
| | | | | | | | | | This test is broken by design. Clang codegen tests should not depend on llvm middle-end behaviour, they should *only* test clang codegen. Yet this test runs whole optimization pipeline. I've really tried to fix it, but there isn't just a few things that depend on passes, but everything there does. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372015 91177308-0d34-0410-b5e6-96231b3b80d8
* [Clang][Codegen] Relax available-externally-suppress.c testRoman Lebedev2019-09-161-2/+0
| | | | | | | | | That test is broken by design. It depends on llvm middle-end behavior. No clang codegen test should be doing that. This one is salvageable by relaxing check lines. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372014 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP]Fix parsing/sema for function templates with declare simd.Alexey Bataev2019-09-162-1/+10
| | | | | | | | Need to return original declaration group with FunctionTemplateDecl, not the inner FunctionDecl, to correctly handle parsing of directives with the templates parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372011 91177308-0d34-0410-b5e6-96231b3b80d8
* Move some definitions from Sema to Basic to fix shared libs buildErich Keane2019-09-163-88/+91
| | | | | | | | r371875 moved some functionality around to a Basic header file, but didn't move its definitions as well. This patch moves some things around so that shared library building can work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@371985 91177308-0d34-0410-b5e6-96231b3b80d8