- Sep 19, 2016
-
-
Yaxun Liu authored
Differential Revision: https://reviews.llvm.org/D24626 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281904 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Liu authored
Summary: Diff to r281457: - added a test case `CalculateRangesOfInsertionAroundReplacement`. Reviewers: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D24606 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281891 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 17, 2016
-
-
Eric Liu authored
When replacements have the same offset, make replacements with smaller length order first in the set. Summary: No behavioral change intended. The change makes iterating the replacements set more intuitive in Replacements class implementation. Previously, insertion is ordered before an deletion/replacement with the same offset, which is counter-intuitive for implementation, especially for a followup patch to support adding insertions around replacements. With the current ordering, we only need to make `applyAllReplacements` iterate the replacements set reversely when applying them so that deletion/replacement is still applied before insertion with the same offset. Reviewers: klimek, djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D24663 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281819 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 16, 2016
-
-
Eric Fiselier authored
* Fix an egregious comma usage. * Remove the `static` keyword in the example since the variables should have external linkage. * Use C++11 attributes in the example. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281712 91177308-0d34-0410-b5e6-96231b3b80d8
-
David L. Jones authored
Currently, the Clang version is computed as follows: 1. LLVM defines major, minor, and patch versions, all statically set. Today, these are 4, 0, and 0, respectively. 2. The static version numbers are combined into PACKAGE_VERSION along with a suffix, so the result today looks like "4.0.0svn". 3. Clang extracts CLANG_VERSION from PACKAGE_VERSION using a regexp. The regexp allows the patch level to omitted, and drops any non-digit trailing values. Today, this result looks like "4.0.0". 4. CLANG_VERSION is then split further into CLANG_VERSION_MAJOR and CLANG_VERSION_MINOR. Today, these resolve to 4 and 0, respectively. 5. If CLANG_VERSION matches a regexp with three version components, then CLANG_VERSION_PATCHLEVEL is extracted and the CLANG_HAS_VERSION_PATCHLEVEL variable is set to 1. Today, these values are 0 and 1, respectively. 6. The CLANG_VERSION_* variables (and CLANG_HAS_VERSION_PATCHLEVEL) are configured into [llvm/tools/clang/]include/clang/Basic/Version.inc verbatim by CMake. 7. In [llvm/tools/clang/]include/clang/Basic/Version.h, macros are defined conditionally, based on CLANG_HAS_VERSION_PATCHLEVEL, to compute CLANG_VERSION_STRING as either a two- or three-level version number. Today, this value is "4.0.0", because despite the patchlevel being 0, it was matched by regexp and is thus "HAS"ed by the preprocessor. This string is then used wherever Clang's "version" is needed [*]. [*] Including, notably, by compiler-rt, for computing its installation path. This change collapses steps 2-5 by defaulting Clang to use LLVM's (non-string) version components for the Clang version (see [*] for why not PACKAGE_VERSION), and collapses steps 6 and 7 by simply writing CLANG_VERSION_STRING into Version.inc. The Clang version today always uses the patchlevel form, so the collapsed Version.inc does not have logic for a version without a patch level. Historically speaking, this technique began with the VER file in r82085 (which survives in the form of the regexp in #3). The major, minor, and patchlevel versions were introduced by r106863 (which remains in #4-6). The VER file itself was deleted in favor of the LLVM version number in r106914. On the LLVM side, the individual LLVM_VERSION_MAJOR, LLVM_VERSION_MINOR, and PACKAGE_VERSION weren't introduced for nearly two more years, until r150405. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281666 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 15, 2016
-
-
Oliver Stannard authored
The ARM-specific C attributes (currently just interrupt) need to check for both the big- and little-endian versions of the triples, so that they are accepted for both big and little endian targets. TargetWindows and TargetMicrosoftCXXABI also only use the little-endian triples, but this is correct as windows is not supported on big-endian ARM targets (and this is asserted in lib/Basic/Targets.cpp). Differential Revision: https://reviews.llvm.org/D24245 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281596 91177308-0d34-0410-b5e6-96231b3b80d8
-
NAKAMURA Takumi authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281582 91177308-0d34-0410-b5e6-96231b3b80d8
-
Artem Belevich authored
Commit was breaking our internal tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281557 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
lib/Tooling injects this argument without regard for what driver syntax is in use. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281550 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 14, 2016
-
-
Albert Gutowski authored
Reviewers: thakis, compnerd, majnemer, rsmith, rnk Subscribers: alexshap, cfe-commits Differential Revision: https://reviews.llvm.org/D24330 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281540 91177308-0d34-0410-b5e6-96231b3b80d8
-
Kirill Bobyrev authored
Assert text for getSingleDecl() is inaccurate. Appears to have been copy pasted from getDeclGroup(). Patch by Ben Taylor! Reviewers: alexfh Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24518 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281525 91177308-0d34-0410-b5e6-96231b3b80d8
-
Dehao Chen authored
Summary: This patch converts finite/__finite to builtin functions so that it will be inlined by compiler. Reviewers: hfinkel, davidxl, efriedma Subscribers: efriedma, llvm-commits Differential Revision: https://reviews.llvm.org/D24483 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281509 91177308-0d34-0410-b5e6-96231b3b80d8
-
Stephan Bergmann authored
Differential Revision: https://reviews.llvm.org/D23907 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281469 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Liu authored
Summary: Extend `tooling::Replacements::add()` to support adding order-independent replacements. Two replacements are considered order-independent if one of the following conditions is true: - They do not overlap. (This is already supported.) - One replacement is insertion, and the other is a replacement with length > 0, and the insertion is adjecent to but not contained in the other replacement. In this case, the replacement should always change the original code instead of the inserted text. Reviewers: klimek, djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D24515 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281457 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Liu authored
Revert "[modules] When merging one definition into another, propagate the list of re-exporting modules from the discarded definition to the retained definition." This reverts commit r281429. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281452 91177308-0d34-0410-b5e6-96231b3b80d8
-
Jonas Hahnfeld authored
This patch adds an entry for "-rtlib" in the output of `man clang` and `clang -help`. Patch by Lei Zhang! Differential Revision: https://reviews.llvm.org/D24069 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281440 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
padding around table cells so the borders of adjacent tables don't run into each other (now that they're perfectly aligned). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281436 91177308-0d34-0410-b5e6-96231b3b80d8
-
Kostya Serebryany authored
[sanitizer-coverage] add yet another flavour of coverage instrumentation: trace-pc-guard. The intent is to eventually replace all of {bool coverage, 8bit-counters, trace-pc} with just this one. Clang part git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281432 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
re-exporting modules from the discarded definition to the retained definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281429 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281427 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281415 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
-Wdiv-by-zero may as well be an alias for -Wdivision-by-zero rather than a GCC-compatibility no-op. -Wno-shadow should disable -Wshadow-ivar. -Weffc++ may as well enable -Wnon-virtual-dtor like it does in GCC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281412 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 13, 2016
-
-
Manman Ren authored
Correct getExtraLocalDataSize for ObjCTypeParamTypeLoc. rdar://24619481 rdar://25060179 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281404 91177308-0d34-0410-b5e6-96231b3b80d8
-
Albert Gutowski authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281401 91177308-0d34-0410-b5e6-96231b3b80d8
-
Albert Gutowski authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281399 91177308-0d34-0410-b5e6-96231b3b80d8
-
Albert Gutowski authored
Reviewers: compnerd, thakis, Prazek, majnemer, rnk Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24153 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281378 91177308-0d34-0410-b5e6-96231b3b80d8
-
Albert Gutowski authored
Reviewers: thakis, compnerd, majnemer, rsmith, rnk Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24330 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281375 91177308-0d34-0410-b5e6-96231b3b80d8
-
Nico Weber authored
This mostly behaves cl.exe's behavior, even though clang-cl is stricter in some corner cases and more lenient in others (see the included test). To make the uuid declared previously here diagnostic work correctly, tweak stripTypeAttributesOffDeclSpec() to keep attributes in the right order. https://reviews.llvm.org/D24469 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281367 91177308-0d34-0410-b5e6-96231b3b80d8
-
Manman Ren authored
We also need to add ObjCTypeParamTypeLoc. ObjCTypeParamType supports the representation of "T <protocol>" where T is a type parameter. Before this, we use TypedefType to represent the type parameter for ObjC. ObjCTypeParamType has "ObjCTypeParamDecl *OTPDecl" and it extends from ObjCProtocolQualifiers. It is a non-canonical type and is canonicalized to the underlying type with the protocol qualifiers. rdar://24619481 rdar://25060179 Differential Revision: http://reviews.llvm.org/D23079 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281355 91177308-0d34-0410-b5e6-96231b3b80d8
-
Manman Ren authored
To construct the canonical type of ObjCTypeParamType, we need to apply qualifiers on ObjCObjectPointerType. The updated applyObjCProtocolQualifiers handles this case by merging the protocol lists, constructing a new ObjCObjectType, then a new ObjCObjectPointerType. rdar://24619481 rdar://25060179 Differential Revision: http://reviews.llvm.org/D24059 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281353 91177308-0d34-0410-b5e6-96231b3b80d8
-
Manman Ren authored
Now ObjCObjectType extends from ObjCProtocolQualifiers. We save number of protocols in ObjCProtocolQualifiers. This is in preparation of adding a new type class ObjCTypeParamType that can take protocol qualifiers. rdar://24619481 rdar://25060179 Differential Revision: http://reviews.llvm.org/D23078 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281351 91177308-0d34-0410-b5e6-96231b3b80d8
-
Nico Weber authored
The unit tests in this patch demonstrate the need to traverse template parameter lists of DeclaratorDecls (e.g. VarDecls, CXXMethodDecls) and TagDecls (e.g. EnumDecls, RecordDecls). Fixes PR29042. https://reviews.llvm.org/D24268 Patch from Lukasz Łukasz Anforowicz <lukasza@chromium.org>! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281345 91177308-0d34-0410-b5e6-96231b3b80d8
-
Adam Nemet authored
Original commit message: Add -fdiagnostics-show-hotness Summary: I've recently added the ability for optimization remarks to include the hotness of the corresponding code region. This uses PGO and allows filtering of the optimization remarks by relevance. The idea was first discussed here: http://thread.gmane.org/gmane.comp.compilers.llvm.devel/98334 The general goal is to produce a YAML file with the remarks. Then, an external tool could dynamically filter these by hotness and perhaps by other things. That said it makes sense to also expose this at the more basic level where we just include the hotness info with each optimization remark. For example, in D22694, the clang flag was pretty useful to measure the overhead of the additional analyses required to include hotness. (Without the flag we don't even run the analyses.) For the record, Hal has already expressed support for the idea of this patch on IRC. Differential Revision: https://reviews.llvm.org/D23284 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281293 91177308-0d34-0410-b5e6-96231b3b80d8
-
Adam Nemet authored
This reverts commit r281276. Many bots are failing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281279 91177308-0d34-0410-b5e6-96231b3b80d8
-
Adam Nemet authored
Summary: I've recently added the ability for optimization remarks to include the hotness of the corresponding code region. This uses PGO and allows filtering of the optimization remarks by relevance. The idea was first discussed here: http://thread.gmane.org/gmane.comp.compilers.llvm.devel/98334 The general goal is to produce a YAML file with the remarks. Then, an external tool could dynamically filter these by hotness and perhaps by other things. That said it makes sense to also expose this at the more basic level where we just include the hotness info with each optimization remark. For example, in D22694, the clang flag was pretty useful to measure the overhead of the additional analyses required to include hotness. (Without the flag we don't even run the analyses.) For the record, Hal has already expressed support for the idea of this patch on IRC. Differential Revision: https://reviews.llvm.org/D23284 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281276 91177308-0d34-0410-b5e6-96231b3b80d8
-
Adam Nemet authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281275 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 12, 2016
-
-
Richard Smith authored
definition as visible in the discarded definition's module, as we do for other kinds of definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281258 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281241 91177308-0d34-0410-b5e6-96231b3b80d8
-
Martin Bohme authored
Summary: (Needed for D23353.) Reviewers: alexfh Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D23842 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281200 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
remark flags. For now I'm checking in a copy of the built documentation, but we can replace this with a placeholder (as we do for the attributes reference documentation) once we enable building this server-side. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281192 91177308-0d34-0410-b5e6-96231b3b80d8
-