| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 271295
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: clang-format's cleanupAroundReplacements() takes care of header insertions.
Reviewers: bkramer
Subscribers: cfe-commits, hokein
Differential Revision: http://reviews.llvm.org/D20816
llvm-svn: 271287
|
|
|
|
|
|
|
|
|
|
| |
don't matter anymore.
Summary: [include-fixer] use tooling::Replacements since the order of replacements don't matter anymore.
Differential Revision: http://reviews.llvm.org/D20813
llvm-svn: 271279
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
headers.
Summary:
Some changes in the patch:
* Add two commandline flags in clang-include-fixer.
* Introduce a IncludeFixerContext for the queried symbol.
* Pull out CreateReplacementsForHeader.
Reviewers: bkramer
Subscribers: klimek, cfe-commits, ioeric
Differential Revision: http://reviews.llvm.org/D20621
llvm-svn: 271258
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
header name for STL symbols.
Summary: [find-all-symbols] Added hardcode header mapping from header postfix to header name for STL symbols.
Reviewers: klimek, bkramer
Subscribers: cfe-commits, hokein
Differential Revision: http://reviews.llvm.org/D20566
llvm-svn: 270566
|
|
|
|
| |
llvm-svn: 270211
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: bkramer
Subscribers: cfe-commits, ioeric
Differential Revision: http://reviews.llvm.org/D20465
llvm-svn: 270206
|
|
|
|
| |
llvm-svn: 270199
|
|
|
|
|
|
| |
FindAllMacros.
llvm-svn: 270193
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: bkramer
Subscribers: cfe-commits, ioeric
Differential Revision: http://reviews.llvm.org/D20420
llvm-svn: 270189
|
|
|
|
|
|
|
|
|
| |
If a search string starts with "::" we don't want to return any results
for suffixes of that string.
Differential Revision: http://reviews.llvm.org/D20424
llvm-svn: 270055
|
|
|
|
| |
llvm-svn: 270045
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: [include-fixer] Sort headers after inserting new headers.
Reviewers: bkramer
Subscribers: klimek, djasper, hokein, cfe-commits
Differential Revision: http://reviews.llvm.org/D20370
llvm-svn: 270031
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is used to find nested classes. For a nested name foo::bar::qux we
will first look up foo::bar::qux, then foo::bar, then foo unless we find
a result. This is used to support nested classes which are not part of
the index but can only be used if the header for the parent context is
included.
Differential Revision: http://reviews.llvm.org/D20372
llvm-svn: 269956
|
|
|
|
|
|
|
| |
Something behind that flag makes us get fewer typo correction callbacks,
unbreak the tests on windows for now.
llvm-svn: 269894
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: bkramer
Subscribers: cfe-commits, ioeric
Differential Revision: http://reviews.llvm.org/D20354
llvm-svn: 269890
|
|
|
|
| |
llvm-svn: 269874
|
|
|
|
| |
llvm-svn: 269873
|
|
|
|
|
|
| |
for targeting *-win32.
llvm-svn: 269870
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: djasper, klimek
Subscribers: kimgr, cfe-commits, bkramer, ioeric
Differential Revision: http://reviews.llvm.org/D19816
llvm-svn: 269779
|
|
|
|
| |
llvm-svn: 269762
|
|
|
|
|
|
|
|
| |
nested names in the front.
This handles cases where the initial namespace is unknown.
llvm-svn: 269758
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The shared build is broken (again).
To repro: [Release + Shared]
```
-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON
```
Errors:
```
tools/clang/tools/extra/include-fixer/tool/CMakeFiles/clang-include-fixer.dir/ClangIncludeFixer.cpp.o: In function `(anonymous namespace)::includeFixerMain(int, char const**)':
ClangIncludeFixer.cpp:(.text._ZN12_GLOBAL__N_116includeFixerMainEiPPKc+0xbe9): undefined reference to `clang::find_all_symbols::SymbolInfo::SymbolInfo(llvm::StringRef, clang::find_all_symbols::SymbolInfo::SymbolKind, llvm::StringRef, int, std::vector<std::pair<clang::find_all_symbols::SymbolInfo::ContextType, std::string>, std::allocator<std::pair<clang::find_all_symbols::SymbolInfo::ContextType, std::string> > > const&)'
collect2: error: ld returned 1 exit status
```
```
tools/clang/tools/extra/unittests/include-fixer/CMakeFiles/IncludeFixerTests.dir/IncludeFixerTest.cpp.o: In function `clang::include_fixer::(anonymous namespace)::runIncludeFixer(llvm::StringRef, std::vector<std::string, std::allocator<std::string> > const&)':
IncludeFixerTest.cpp:(.text._ZN5clang13include_fixer12_GLOBAL__N_1L15runIncludeFixerEN4llvm9StringRefERKSt6vectorISsSaISsEE+0x10e): undefined reference to `clang::find_all_symbols::SymbolInfo::SymbolInfo(llvm::StringRef, clang::find_all_symbols::SymbolInfo::SymbolKind, llvm::StringRef, int, std::vector<std::pair<clang::find_all_symbols::SymbolInfo::ContextType, std::string>, std::allocator<std::pair<clang::find_all_symbols::SymbolInfo::ContextType, std::string> > > const&)'
IncludeFixerTest.cpp:(.text._ZN5clang13include_fixer12_GLOBAL__N_1L15runIncludeFixerEN4llvm9StringRefERKSt6vectorISsSaISsEE+0x1dc): undefined reference to `clang::find_all_symbols::SymbolInfo::SymbolInfo(llvm::StringRef, clang::find_all_symbols::SymbolInfo::SymbolKind, llvm::StringRef, int, std::vector<std::pair<clang::find_all_symbols::SymbolInfo::ContextType, std::string>, std::allocator<std::pair<clang::find_all_symbols::SymbolInfo::ContextType, std::string> > > const&)'
IncludeFixerTest.cpp:(.text._ZN5clang13include_fixer12_GLOBAL__N_1L15runIncludeFixerEN4llvm9StringRefERKSt6vectorISsSaISsEE+0x2f3): undefined reference to `clang::find_all_symbols::SymbolInfo::SymbolInfo(llvm::StringRef, clang::find_all_symbols::SymbolInfo::SymbolKind, llvm::StringRef, int, std::vector<std::pair<clang::find_all_symbols::SymbolInfo::ContextType, std::string>, std::allocator<std::pair<clang::find_all_symbols::SymbolInfo::ContextType, std::string> > > const&)'
IncludeFixerTest.cpp:(.text._ZN5clang13include_fixer12_GLOBAL__N_1L15runIncludeFixerEN4llvm9StringRefERKSt6vectorISsSaISsEE+0x40e): undefined reference to `clang::find_all_symbols::SymbolInfo::SymbolInfo(llvm::StringRef, clang::find_all_symbols::SymbolInfo::SymbolKind, llvm::StringRef, int, std::vector<std::pair<clang::find_all_symbols::SymbolInfo::ContextType, std::string>, std::allocator<std::pair<clang::find_all_symbols::SymbolInfo::ContextType, std::string> > > const&)'
IncludeFixerTest.cpp:(.text._ZN5clang13include_fixer12_GLOBAL__N_1L15runIncludeFixerEN4llvm9StringRefERKSt6vectorISsSaISsEE+0x526): undefined reference to `clang::find_all_symbols::SymbolInfo::SymbolInfo(llvm::StringRef, clang::find_all_symbols::SymbolInfo::SymbolKind, llvm::StringRef, int, std::vector<std::pair<clang::find_all_symbols::SymbolInfo::ContextType, std::string>, std::allocator<std::pair<clang::find_all_symbols::SymbolInfo::ContextType, std::string> > > const&)'
```
Reviewers: bkramer, hokein
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D20245
llvm-svn: 269441
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: bkramer
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D20205
llvm-svn: 269430
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The InMemorySymbolIndex only constructs hard-coded Class symbols from a string
map. The patch provide a flexable way in InMemorySymbolIndex to create a custom
SymbolInfo in the include-fixer unittest.
Reviewers: bkramer
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D20232
llvm-svn: 269427
|
|
|
|
|
|
| |
It's not really containing xrefs so the name didn't fit. No functional change.
llvm-svn: 269403
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Also change enums defined in SymbolInfo to scoped enums to avoid
conflicts.
Reviewers: bkramer
Subscribers: cfe-commits, ioeric
Differential Revision: http://reviews.llvm.org/D20203
llvm-svn: 269401
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
SymbolInfo has some optional fields, which is a bad-smell
implementation. For now, we
* remove the optional field since we don't need them (we can probably
add them back if we actually need them in the future)
* make SymbolInfo to be a class.
By this change, the code is more simplified.
Reviewers: klimek
Subscribers: cfe-commits, ioeric, bkramer
Differential Revision: http://reviews.llvm.org/D20095
llvm-svn: 269162
|
|
|
|
|
|
| |
for targeting win32. Investigating.
llvm-svn: 269135
|
|
|
|
|
|
|
|
|
|
|
|
| |
We already handled the case where we had a nested name specifier where
parts from the beginning don't get a callback, also handle the case
where the end doesn't get a callback. This happens with function calls
in unknown namespaces.
The way we do this for now based on character data is a bit of a hack, we
may need to refine this later or fix clang to produce different callbacks.
llvm-svn: 269029
|
|
|
|
|
|
|
|
| |
We used a std::set which made the picked include somewhat random (well,
lexicographically sorted). Make the behavior more consistent by always
picking the first one we found.
llvm-svn: 269028
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Added XrefsDBManager into include-fixer and made XrefsDB return SymbolInfo.
Reviewers: hokein, djasper, klimek
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D19869
llvm-svn: 268480
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This is a step forward cleaning up the namespaces in clang-tidy/utils.
There is no behavior change.
Reviewers: alexfh
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D19819
llvm-svn: 268356
|
|
|
|
|
|
|
|
| |
You Use warnings.
Differential revision: http://reviews.llvm.org/D19755
llvm-svn: 268262
|
|
|
|
|
|
|
| |
This will always pick the shortest possible path based on -I options. Based
on the #include suggestion code for modules.
llvm-svn: 267868
|
|
|
|
|
|
|
|
|
|
| |
In file included from symbol.cc:1:
symbols.h:2:24: error: typedef redefinition with different types ('unsigned int'
vs 'unsigned long long')
typedef unsigned size_t;
^
llvm-svn: 267841
|
|
|
|
| |
llvm-svn: 267754
|
|
|
|
| |
llvm-svn: 267739
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The find-all-symbols tool generates a yaml symbol database for
include-fixer.
The symbol matcher is originally written by Xiaoyi Liu.
Reviewers: bkramer, djasper
Subscribers: cfe-commits, klimek, ioeric
Differential Revision: http://reviews.llvm.org/D19482
llvm-svn: 267719
|
|
|
|
|
|
| |
clang/tools/extra.
llvm-svn: 266874
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The goal of this tool is fairly simple, look up unknown identifiers in a
global database and add the corresponding #include line. It accomplishes
this by hooking into Sema as an ExternalSemaSource and responding to typo
correction callbacks. This means we can see the unknown identifier before
it's being munged by error recovery.
This doesn't work perfectly yet as some typo corrections don't emit
callbacks (delayed typos), but I think this is fixable. We also handle
only one include at a time as this is meant to be run directly from
the editing environment eventually. Adding multiple includes at the same
time is tricky because of error recovery.
This version only has a a dummy database, so all you can do is fixing
missing includes of <string>, but the indexer to build a database will
follow soon.
Reviewers: djasper
Subscribers: ioeric, hokein, cfe-commits
Differential Revision: http://reviews.llvm.org/D19314
llvm-svn: 266870
|
|
|
|
|
|
| |
Differential revision: http://reviews.llvm.org/D18231
llvm-svn: 263726
|
|
|
|
|
|
|
|
| |
unittests/clang-tidy/IncludeInserterTest.cpp; other minor fixes.
Differential revision: http://reviews.llvm.org/D16566
llvm-svn: 258870
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html
"Now I am become Death, the destroyer of worlds."
-J. Robert Oppenheimer
Reviewers: chandlerc, grosbach, bob.wilson, echristo
Subscribers: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D16475
llvm-svn: 258864
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
clang-modernize transforms have moved to clang-tidy. Removing
the old tool now.
Reviewers: klimek
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D15606
llvm-svn: 255886
|
|
|
|
|
|
|
|
|
| |
Breaks the build in GCC 4.7.2 (see
http://lab.llvm.org:8011/builders/perf-x86_64-penryn-O3 for example)
This reverts commit r250824.
llvm-svn: 250862
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Replace empty bodies of default constructors and destructors with '= default'.
Reviewers: klimek
Subscribers: alexfh, cfe-commits
Differential Revision: http://reviews.llvm.org/D13889
llvm-svn: 250824
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Prevent clang-tidy from applying fixes to errors that overlap with other errors' fixes, with one exception: if one fix is completely contained inside another one, then we can apply the big one.
Reviewers: bkramer, klimek
Subscribers: djasper, cfe-commits, alexfh
Differential Revision: http://reviews.llvm.org/D13516
llvm-svn: 250509
|
|
|
|
|
|
|
| |
Again, this is both cleaner and completely removes any depedency on the
host file system.
llvm-svn: 249526
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: No changes in clang-tidy yet.
Reviewers: klimek
Subscribers: alexfh, cfe-commits
Differential Revision: http://reviews.llvm.org/D13469
llvm-svn: 249402
|