| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Summary: These correspond to the existing match() free functions.
Reviewers: aaron.ballman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D54406
|
|
|
|
|
|
|
|
|
|
| |
Now that we've moved to C++14, we no longer need the llvm::make_unique
implementation from STLExtras.h. This patch is a mechanical replacement
of (hopefully) all the llvm::make_unique instances across the monorepo.
Differential revision: https://reviews.llvm.org/D66259
llvm-svn: 368942
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
`OMPClause` is the base class, it is not descendant from **any**
other class, therefore for it to work with e.g.
`VariadicDynCastAllOfMatcher<>`, it needs to be handled here.
Reviewers: sbenza, bkramer, pcc, klimek, hokein, gribozavr, aaron.ballman, george.karpenkov
Reviewed By: gribozavr, aaron.ballman
Subscribers: guansong, jdoerfert, alexfh, ABataev, cfe-commits
Tags: #openmp, #clang
Differential Revision: https://reviews.llvm.org/D57112
llvm-svn: 356675
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
A simple matcher for `OMPExecutableDirective` Stmt type.
Split off from D57113.
Reviewers: gribozavr, aaron.ballman, JonasToth, george.karpenkov
Reviewed By: gribozavr, aaron.ballman
Subscribers: guansong, jdoerfert, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D59453
llvm-svn: 356674
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This allows ASTs to be merged when they contain ChooseExpr (the GNU
__builtin_choose_expr construction). This is needed, for example, for
cross-CTU analysis of C code that makes use of __builtin_choose_expr.
The node is already supported in the AST, but it didn't have a matcher
in ASTMatchers. So, this change adds the matcher and adds support to
ASTImporter.
This was originally reviewed and approved in
https://reviews.llvm.org/D58292 and submitted as r354832. It was
reverted in r354839 due to failures on the Windows CI builds.
This version fixes the test failures on Windows, which were caused by
differences in template expansion between versions of clang on different
OSes. The version of clang built with MSVC and running on Windows never
expands the template in the C++ test in ImportExpr.ImportChooseExpr in
clang/unittests/AST/ASTImporter.cpp, but the version on Linux does for
the empty arguments and -fms-compatibility.
So, this version of the patch drops the C++ test for
__builtin_choose_expr, since that version was written to catch
regressions of the logic for isConditionTrue() in the AST import code
for ChooseExpr, and those regressions are also caught by
ASTImporterOptionSpecificTestBase.ImportChooseExpr, which does work on
Windows.
Reviewers: shafik, a_sidorin, martong, aaron.ballman, rnk, a.sidorin
Subscribers: cfe-commits, jdoerfert, rnkovacs, aaron.ballman
Tags: #clang
Differential Revision: https://reviews.llvm.org/D58663
llvm-svn: 354916
|
|
|
|
|
|
| |
Test does not pass on Windows
llvm-svn: 354839
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This allows ASTs to be merged when they contain ChooseExpr (the GNU
__builtin_choose_expr construction). This is needed, for example, for
cross-CTU analysis of C code that makes use of __builtin_choose_expr.
The node is already supported in the AST, but it didn't have a matcher
in ASTMatchers. So, this change adds the matcher and adds support to
ASTImporter.
Reviewers: shafik, a_sidorin, martong, aaron.ballman
Subscribers: aaron.ballman, rnkovacs, jdoerfert, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D58292
llvm-svn: 354832
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to reflect the new license.
We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.
llvm-svn: 351636
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Currently the Clang AST doesn't store information about how the callee of a CallExpr was found. Specifically if it was found using ADL.
However, this information is invaluable to tooling. Consider a tool which renames usages of a function. If the originally CallExpr was formed using ADL, then the tooling may need to additionally qualify the replacement.
Without information about how the callee was found, the tooling is left scratching it's head. Additionally, we want to be able to match ADL calls as quickly as possible, which means avoiding computing the answer on the fly.
This patch changes `CallExpr` to store whether it's callee was found using ADL. It does not change the size of any AST nodes.
Reviewers: fowles, rsmith, klimek, shafik
Reviewed By: rsmith
Subscribers: aaron.ballman, riccibruno, calabrese, titus, cfe-commits
Differential Revision: https://reviews.llvm.org/D55534
llvm-svn: 348977
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This patch allows fixing PR39583.
Reviewers: aaron.ballman, sbenza, klimek
Reviewed By: aaron.ballman
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D54307
llvm-svn: 346554
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Compound literals, enums, file-scoped arrays, etc. require their
initializers and size specifiers to be constant. Wrap the initializer
expressions in a ConstantExpr so that we can easily check for this later
on.
Reviewers: rsmith, shafik
Reviewed By: rsmith
Subscribers: cfe-commits, jyknight, nickdesaulniers
Differential Revision: https://reviews.llvm.org/D53921
llvm-svn: 346455
|
|
|
|
|
|
|
|
|
|
|
|
| |
CXXDependentScopeMemberExpr
Reviewers: aaron.ballman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D52157
llvm-svn: 342407
|
|
|
|
|
|
|
|
| |
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D50606
llvm-svn: 339522
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch introduces a new matcher for `DecltypeType` and its underlying type
in order to fix a bug in clang-tidy, see https://reviews.llvm.org/D48717 for more.
Reviewers: aaron.ballman, alexfh, NoQ, dcoughlin
Reviewed By: aaron.ballman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D48759
llvm-svn: 337703
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D48910
llvm-svn: 336468
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows matchers like:
friendDecl(hasType(cxxRecordDecl(...)))
friendDecl(hasType(asString(...)))
It seems that hasType is probably the most reasonable narrowing matcher to
overload, since it is already used to narrow to other declaration kinds.
Differential Revision: https://reviews.llvm.org/D48242
Reviewers: klimek, aaron.ballman
Subscribers: cfe-commits
llvm-svn: 334930
|
|
|
|
|
|
|
|
| |
The specifiesTypeLoc() matcher narrows a nestedNameSpecifier matcher based on a
typeloc within the NNS. However, the matcher does not guard against NNS which
are a namespace, and cause getTypeLoc to assert-fail.
llvm-svn: 334929
|
|
|
|
|
|
|
|
| |
Incudes a tiny related refactoring.
Differential Revision: https://reviews.llvm.org/D44858
llvm-svn: 328747
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Add AST matchers for Objective-C @throw, @try, @catch and @finally.
Reviewers: aaron.ballman, malcolm.parsons, alexshap, compnerd
Reviewed By: aaron.ballman
Subscribers: cfe-commits, klimek
Differential Revision: https://reviews.llvm.org/D39940
llvm-svn: 317992
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add `objcCategoryImplDecl` which matches ObjC category definitions
(`@implementation`). This matcher complements `objcCategoryDecl` (`@interface`)
which was added in D30854.
Reviewers: aaron.ballman, malcolm.parsons, alexshap
Reviewed By: aaron.ballman
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D39293
llvm-svn: 316670
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add the `objcImplementationDecl` matcher. See related: D30854
Tested with:
```
./tools/clang/unittests/ASTMatchers/ASTMatchersTests
```
Reviewers: aaron.ballman, compnerd, alexshap
Reviewed By: aaron.ballman
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D37643
llvm-svn: 312889
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
HasDeclarationMatcher did not handle DeducedType, it always returned false for deduced types.
So with code like this:
struct X{};
auto x = X{};
This did no longer match:
varDecl(hasType(recordDecl(hasName("X"))))
Because HasDeclarationMatcher didn't resolve the DeducedType of x.
Differential Revision: https://reviews.llvm.org/D36308
llvm-svn: 310095
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
documentation.
Trying to match integerLiteral(-1) will silently fail, because an numeric
literal is always positive.
- Update the documentation to explain how to match negative numeric
literals.
- Add a unit test.
Differential Revision: https://reviews.llvm.org/D35196
llvm-svn: 307663
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This adds a new ASTMatcher for CXXStdInitializerListExprs that matches C++ initializer list expressions.
The primary motivation is to use it to fix [[ https://bugs.llvm.org/show_bug.cgi?id=32896 | PR32896 ]] (review here [[ https://reviews.llvm.org/D32767 | D32767 ]]).
Reviewers: alexfh, Prazek, aaron.ballman
Reviewed By: alexfh, aaron.ballman
Subscribers: malcolm.parsons, cfe-commits, klimek
Differential Revision: https://reviews.llvm.org/D32810
llvm-svn: 302287
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: hokein, aaron.ballman
Reviewed By: aaron.ballman
Subscribers: aaron.ballman, cfe-commits, klimek
Differential Revision: https://reviews.llvm.org/D28671
llvm-svn: 298912
|
|
|
|
|
|
|
|
| |
ObjCIvarDecl, and ObjCPropertyDecl.
Patch by Dave Lee.
llvm-svn: 297882
|
|
|
|
|
|
|
| |
temporary produces an xvalue, not a prvalue. Support this by materializing the
temporary prior to performing the member access.
llvm-svn: 288563
|
|
|
|
|
|
| |
used as a top-level matcher.
llvm-svn: 282417
|
|
|
|
|
|
|
|
|
|
|
| |
It was failing because it had an explicit check for whether we're on
Windows.
There are a few other similar explicit checks in this file which I
didn't remove because they serve as reasonable documentation that the
test doesn't work with a Windows triple.
llvm-svn: 274269
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: aaron.ballman
Subscribers: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D21860
llvm-svn: 274217
|
|
|
|
|
|
|
|
|
|
| |
MaterializeTemporaryExpr."
Since D21243 fixes relative clang-tidy tests.
This reverts commit a71d9fbd41e99def9159af2b01ef6509394eaeed.
llvm-svn: 273312
|
|
|
|
|
|
|
|
|
| |
MaterializeTemporaryExpr."
This reverts r272296, since there are clang-tidy failures that appear to
be caused by this change.
llvm-svn: 272310
|
|
|
|
|
|
|
|
|
|
|
| |
These ExprWithCleanups are added for holding a RunCleanupsScope not
for destructor calls; rather, they are for lifetime marks. This requires
ExprWithCleanups to keep a bit to indicate whether it have cleanups with
side effects (e.g. dtor calls).
Differential Revision: http://reviews.llvm.org/D20498
llvm-svn: 272296
|
|
|
|
|
|
| |
expressions). This is required for traversing certain types (like function pointer types).
llvm-svn: 271927
|
|
|
|
| |
llvm-svn: 269957
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: alexfh, aaron.ballman
Subscribers: thakis, cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D20369
llvm-svn: 269936
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: alexfh, aaron.ballman
Subscribers: aaron.ballman, klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D20360
llvm-svn: 269916
|
|
fix for long compilation [20061]
http://reviews.llvm.org/D20210
llvm-svn: 269802
|