John Thompson
f9f62b116f
Changed option processing to implicitly use -x c++ if no other -x option specified. Added implicit -w option to disable compilation warnings, in particular to avoid warning on pragma once.
...
llvm-svn: 236625
2015-05-06 18:43:01 +00:00
John Thompson
fcf3f47d7a
Fixed infinite recursion bug.
...
llvm-svn: 236624
2015-05-06 18:39:15 +00:00
Richard Smith
33de8566f0
Update to match clang r236404.
...
llvm-svn: 236405
2015-05-04 03:15:55 +00:00
Richard Smith
76e66607a3
Fix clang-tools-extra build after clang r235614.
...
llvm-svn: 235642
2015-04-23 20:38:48 +00:00
Alexander Kornienko
87638f6345
Use 'override/final' instead of 'virtual' for overridden methods
...
Summary:
The patch is generated using clang-tidy misc-use-override check.
This command was used:
tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \
-checks='-*,misc-use-override' -header-filter='llvm|clang' -j=32 -fix
svn diff | clang-format-diff -i
Reviewers: dblaikie
Reviewed By: dblaikie
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D8927
llvm-svn: 234681
2015-04-11 07:59:33 +00:00
David Blaikie
4754aa80e5
Refactor: Simplify boolean expression in modularize
...
Simplify boolean expressions using `true` and `false` with `clang-tidy`
Patch by Richard Thomson.
Differential Revision: http://reviews.llvm.org/D8534
llvm-svn: 233000
2015-03-23 19:40:59 +00:00
Benjamin Kramer
e71037123b
Make helpers static. clang-tools edition.
...
Also purge dead code found by it. NFC.
llvm-svn: 232948
2015-03-23 12:49:15 +00:00
John Thompson
84ced5c1af
Renamed function to avoid confusion about purpose.
...
llvm-svn: 231440
2015-03-06 00:39:42 +00:00
John Thompson
b70ecf6eef
Fixed canonical path function.
...
llvm-svn: 230665
2015-02-26 19:31:10 +00:00
Adrian Prantl
b97f5c1eb2
Revert "Adapt clang-tools-extra to clang module format changes."
...
This reverts commit 230424.
llvm-svn: 230456
2015-02-25 02:46:37 +00:00
Adrian Prantl
e95edbf5a9
Adapt clang-tools-extra to clang module format changes.
...
- add clangCodeGen.a to the tools that need it
- tweak pp-trace command line handling to not conflict with clang's.
llvm-svn: 230424
2015-02-25 01:32:04 +00:00
Adrian Prantl
a22fd38174
Revert "Adapt Makefile dependencies for the clang module format change in r230089."
...
llvm-svn: 230104
2015-02-21 00:29:43 +00:00
Adrian Prantl
6897e3e456
Adapt Makefile dependencies for the clang module format change in r230089.
...
llvm-svn: 230090
2015-02-20 23:35:07 +00:00
Nick Lewycky
d07cfbdaa7
Remove carriage returns.
...
llvm-svn: 229975
2015-02-20 07:05:56 +00:00
John Thompson
8eb8d93672
Added module map coverage support, extracted from module-map-checker.
...
llvm-svn: 229869
2015-02-19 16:47:27 +00:00
John Thompson
3c9fb52218
Pruned some unneeded code and comments.
...
llvm-svn: 229855
2015-02-19 14:31:48 +00:00
John Thompson
9cb7964641
Added support for extracting headers from module maps as a source for the header list.
...
llvm-svn: 229692
2015-02-18 16:14:32 +00:00
John Thompson
b87fd7db7c
Temporary hack to avoid false errors. Real fix comming.
...
llvm-svn: 229690
2015-02-18 16:12:26 +00:00
John Thompson
eaa4c73d62
Updated file comment on modularize usage, as it was out-of-date.
...
llvm-svn: 229677
2015-02-18 15:11:12 +00:00
John Thompson
3dcb3934c6
Add canonical path conversion function and use it so paths are consistent.
...
llvm-svn: 229540
2015-02-17 20:43:47 +00:00
John Thompson
9ea81b0041
Fix broken logic for include in block check.
...
llvm-svn: 229187
2015-02-13 23:32:08 +00:00
John Thompson
d845baecb4
Moved header list loading to new class. This is staging for adding module map loading and checking support.
...
llvm-svn: 229108
2015-02-13 14:29:22 +00:00
NAKAMURA Takumi
24fbdf124b
Modularize.cpp: Simplify. Vector may be aware of ranged-for.
...
llvm-svn: 228993
2015-02-13 00:28:32 +00:00
NAKAMURA Takumi
c8930de79e
Modularize.cpp: Prune CRLFs.
...
llvm-svn: 228992
2015-02-13 00:28:26 +00:00
John Thompson
469bbc002a
Added support for multiple header list files, as a precursor for when we need to load multiple module maps.
...
llvm-svn: 228935
2015-02-12 16:22:09 +00:00
John Thompson
f1828ef3c6
Fixed incorrect header inclusion tracking resulting in false error reports.
...
llvm-svn: 228929
2015-02-12 15:26:17 +00:00
John Thompson
ecd3b04cd7
Added -block-check-header-list-only option. This is a work-around for private includes that purposefully get included inside blocks.
...
llvm-svn: 228846
2015-02-11 16:58:36 +00:00
John Thompson
9724431c77
Centralize canonical path conversion.
...
llvm-svn: 228845
2015-02-11 16:45:50 +00:00
John Thompson
5d9862f071
Renamed module.map to module.modulemap (modularize).
...
llvm-svn: 228693
2015-02-10 14:45:30 +00:00
Alexander Kornienko
bf87a8b714
Replace size call with empty call where appripriate in clang/tools/extra
...
This patch is the result of applying fixes of the ContainerSizeEmpty Clang-Tidy
checker which was committed recently.
http://reviews.llvm.org/D7085
Patch by Gábor Horváth!
llvm-svn: 226817
2015-01-22 13:14:29 +00:00
Alexander Kornienko
d365731dd0
Make ArgumentsAdjuster an std::function (clang-tools-extra part of D6505).
...
Reviewers: klimek
Reviewed By: klimek
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D6506
llvm-svn: 223249
2014-12-03 17:53:03 +00:00
David Blaikie
34318816e8
Update for LLVM API change to make Small(Ptr)Set::insert return pair<iterator, bool> as per the C++ standard's associative container concept.
...
llvm-svn: 222336
2014-11-19 07:49:54 +00:00
Craig Topper
775862a277
Unique_ptrify PPCallbacks ownership. Goes with clang r217474.
...
llvm-svn: 217475
2014-09-10 05:07:57 +00:00
Rafael Espindola
b14bd53e6d
Update for LLVM api change
...
llvm-svn: 216396
2014-08-25 18:17:00 +00:00
David Blaikie
680c4c898c
Recommit 213308: unique_ptr-ify ownership of ASTConsumers (reverted in r213324)
...
After post-commit review and community discussion, this seems like a
reasonable direction to continue, making ownership semantics explicit in
the source using the type system.
llvm-svn: 215324
2014-08-10 19:56:59 +00:00
Benjamin Kramer
6e9142474d
Plug memory leaks.
...
Most of the changes are mechanic std::unique_ptr insertions. All leaks were
detected by LeakSanitizer.
llvm-svn: 213851
2014-07-24 10:23:33 +00:00
David Blaikie
5bae2c87d5
Revert "unique_ptr-ify ownership of ASTConsumers"
...
This reverts commit r213308.
Reverting to have some on-list discussion/confirmation about the ongoing
direction of smart pointer usage in the LLVM project.
llvm-svn: 213324
2014-07-17 22:33:56 +00:00
David Blaikie
b9574aceae
unique_ptr-ify ownership of ASTConsumers
...
llvm-svn: 213308
2014-07-17 20:40:47 +00:00
NAKAMURA Takumi
23b702c8de
[CMake] Update libdeps.
...
llvm-svn: 212920
2014-07-14 05:01:53 +00:00
Rafael Espindola
43f0aa6caf
Update for llvm api change.
...
llvm-svn: 212406
2014-07-06 17:43:19 +00:00
David Blaikie
92fc741998
Unbreak the build after r211244.
...
These operator overloads were unneeded (once the const correctness in
PooledStringPtr was corrected) and inefficient (since the strings are
pooled the pointers can just be compared for equality instead of doing
strcmp).
llvm-svn: 211245
2014-06-19 00:43:19 +00:00
Rafael Espindola
c7f0d23f56
Prefix error_code with std.
...
llvm-svn: 210840
2014-06-12 22:08:48 +00:00
Rafael Espindola
002840cf66
Quick build fix.
...
llvm-svn: 210838
2014-06-12 22:01:48 +00:00
Craig Topper
f61be9c971
[C++11] Use 'nullptr'.
...
llvm-svn: 210447
2014-06-09 02:03:06 +00:00
Alp Toker
f88da971e5
Remove inclusions of LLVM's private config.h
...
llvm-svn: 210146
2014-06-04 03:34:26 +00:00
Rafael Espindola
228166a4ca
Use error_code() instead of error_code::succes()
...
There is no std::error_code::success, so this removes much of the noise
in transitioning to std::error_code.
llvm-svn: 209953
2014-05-31 02:00:59 +00:00
Benjamin Kramer
281f9d0e97
Update for Clang API change and move ClangTidyDiagnosticRenderer into an anonymous namespace while there.
...
llvm-svn: 208471
2014-05-10 16:32:07 +00:00
Ahmed Charles
6a2dc5c381
[C++11] Replace OwningPtr with std::unique_ptr.
...
This removes all references to OwningPtr, which should be fairly
undisruptive to out-of-tree projects since they are unlikely to use
clang-tools-extra as a library instead of a set of tools.
llvm-svn: 203382
2014-03-09 09:24:40 +00:00
Rafael Espindola
26af26255c
Update for llvm api change.
...
llvm-svn: 202055
2014-02-24 18:21:04 +00:00
Rafael Espindola
dc59a36caa
Update for llvm api change.
...
llvm-svn: 202045
2014-02-24 15:41:44 +00:00
Alp Toker
58983f1398
Fix typo
...
llvm-svn: 198831
2014-01-09 01:39:49 +00:00
Chandler Carruth
f7e45c0ed4
Fix the top header that corresponds to this source file. Thanks for
...
spotting this Cody Maloney!
llvm-svn: 198716
2014-01-07 22:15:39 +00:00
Chandler Carruth
85e6e87171
Run llvm/utils/sort_includes.py over the Clang tools code. This doesn't
...
always produce as pretty of results as it does in LLVM and Clang, but
I don't mind and the value of having a single canonical ordering is very
high IMO.
Let me know if you spot really serious problems here.
llvm-svn: 198703
2014-01-07 20:05:01 +00:00
John Thompson
e744d2b92d
Fix assertion error.
...
llvm-svn: 196863
2013-12-10 02:26:44 +00:00
NAKAMURA Takumi
78f534d689
[CMake] clang-tools-extra: Update dependencies.
...
llvm-svn: 196860
2013-12-10 01:41:10 +00:00
NAKAMURA Takumi
ff9225f3d7
[CMake] clang-tools-extra may not depend on LLVM CodeGen.
...
llvm-svn: 196805
2013-12-09 19:27:57 +00:00
John Thompson
87f9fef5a5
Changed ConditionValue argument to PPCallbacks If and Elif callbacks to be a 3-state enum.
...
llvm-svn: 196648
2013-12-07 08:41:15 +00:00
John Thompson
abe79d9fd2
Improve comment, as requested by Alp Toker.
...
llvm-svn: 196409
2013-12-04 20:41:30 +00:00
Alp Toker
9a5134e6be
Fix a variety of user-visible and comment typos
...
llvm-svn: 196038
2013-12-01 05:08:12 +00:00
NAKAMURA Takumi
bf5391d2ef
clang-tools-extra/modularize: Compare Paths to Prefix as natively-canonicalized form.
...
On Win32, paths are not expected to be canonicalized.
llvm-svn: 192763
2013-10-16 01:42:33 +00:00
Will Dietz
0f3b4aaf34
ModuleAssistant: Fix warning, don't return bool as a pointer.
...
No functionality change intended.
llvm-svn: 192713
2013-10-15 15:45:00 +00:00
John Thompson
5ab4f11152
Added module map generation option.
...
llvm-svn: 192703
2013-10-15 13:52:33 +00:00
John Thompson
a2b66875d3
Added colon to make proper error message prefix.
...
llvm-svn: 191092
2013-09-20 14:44:20 +00:00
Alexey Samsonov
2a8fcee302
Don't use default label in fully covered switch
...
llvm-svn: 190992
2013-09-19 07:35:47 +00:00
John Thompson
740839260b
Check for #include in extern and namespace blocks.
...
llvm-svn: 190950
2013-09-18 18:19:43 +00:00
Benjamin Kramer
3353a10339
Modularize: Use in-place version of sys::path::native.
...
llvm-svn: 190511
2013-09-11 10:45:25 +00:00
John Thompson
7d0213c581
modularize - Fix of header dependencies - this time with the source.
...
llvm-svn: 189984
2013-09-04 20:46:24 +00:00
John Thompson
53a9d2da49
modularize - Update main comment.
...
llvm-svn: 189968
2013-09-04 18:29:36 +00:00
Bob Wilson
f5999bda8c
Revert svn 189837 "Added header dependencies support."
...
The NoProblemsDependencies.modularize test is failing on many buildbots.
I have also reverted the change in 189904 to disable that test for MSVC.
llvm-svn: 189957
2013-09-04 16:48:28 +00:00
John Thompson
7475180f9b
Added header dependencies support.
...
llvm-svn: 189837
2013-09-03 18:48:43 +00:00
John Thompson
cc2e291dac
Ran clang-format for a base-line.
...
llvm-svn: 189836
2013-09-03 18:44:11 +00:00
John Thompson
9e8d672206
Updated the main comment with respect to problems and future directions.
...
llvm-svn: 189229
2013-08-26 15:55:47 +00:00
John Thompson
8e01c069c9
Fixed some issues that resulted in erroneous duplicate symbol error messages.
...
llvm-svn: 189228
2013-08-26 15:17:23 +00:00
Alexey Samsonov
f656e1783b
Add dependencies on TransformUtils library in preparation for re-applying r188666
...
llvm-svn: 188674
2013-08-19 13:58:56 +00:00
John Thompson
c8d710cc82
Avoid errors on header guards using #if defined(NAME).
...
llvm-svn: 188306
2013-08-13 18:11:36 +00:00
Nico Weber
8e20be2aea
Remove CRs added in r187370.
...
llvm-svn: 188168
2013-08-12 11:43:36 +00:00
John Thompson
bb0a3b0668
Fixed coding convention naming issue - variable names start with uppercase.
...
llvm-svn: 188070
2013-08-09 13:52:09 +00:00
John Thompson
91555bde88
Fix false error message for function-style macro instance used as arguments in other function-style macros instances, and add test for it.
...
llvm-svn: 188036
2013-08-09 00:22:20 +00:00
John Thompson
4fa9c2cbc6
Extend comments for problems and future directions.
...
llvm-svn: 188035
2013-08-09 00:19:03 +00:00
John Thompson
181ea2e957
Comment changes. Added current problems comment.
...
llvm-svn: 187942
2013-08-08 00:00:10 +00:00
John Thompson
4ed963a0ba
Fixed incorrect header guard/nested header mechanism.
...
llvm-svn: 187898
2013-08-07 18:49:47 +00:00
John Thompson
48df096c3f
Fixed uninitialized member, plus recommit of 187736.
...
llvm-svn: 187757
2013-08-05 23:55:14 +00:00
Arnold Schwaighofer
30448e607e
Reverting r187736. It broke some public bots:
...
http://lab.llvm.org:8011/builders/clang-native-arm-cortex-a9/builds/10248
http://bb.pgr.jp/builders/cmake-clang-i686-mingw32/builds/3327
llvm-svn: 187746
2013-08-05 22:03:41 +00:00
John Thompson
ea8e668516
Fixed incorrect include file exit detection. Added work-around to avoid error on header guard in nested include. Fixed a couple of coding standard issues on variable names.
...
llvm-svn: 187736
2013-08-05 19:15:50 +00:00
John Thompson
dc118270ac
Fixed comment typo.
...
llvm-svn: 187384
2013-07-29 21:59:41 +00:00
John Thompson
7c6e79f395
Fixed comment issues (non-ASCII chars, typos) per review, expanded some comments.
...
llvm-svn: 187370
2013-07-29 19:07:00 +00:00
Benjamin Kramer
f25768103a
modularize: Remove default case from fully covered switch.
...
llvm-svn: 187306
2013-07-27 15:57:46 +00:00
John Thompson
94faa4d0d4
Fixed case change that caused the test failure. Incorporarated Sean's review changes, consisting only of renaming and comment changes.
...
llvm-svn: 187277
2013-07-26 23:56:42 +00:00
Rafael Espindola
17b15cfbe3
Revert "Added new feature for checking macro and preprocessor conditional consistency."
...
This reverts commit r187228. It broke some bots:
http://bb.pgr.jp/builders/cmake-clang-i686-mingw32
llvm-svn: 187235
2013-07-26 19:23:33 +00:00
John Thompson
1e0101461e
Added new feature for checking macro and preprocessor conditional consistency.
...
llvm-svn: 187228
2013-07-26 18:16:22 +00:00
John Thompson
b809dfcf3a
Fixed some formatting issues with clang-format to get a baseline.
...
llvm-svn: 186675
2013-07-19 14:19:31 +00:00
John Thompson
161381e120
Ran clang-format on Modularize.cpp to get a baseline for future changes.
...
llvm-svn: 185092
2013-06-27 18:52:23 +00:00
John Thompson
26b567ae6a
Fixed typo.
...
llvm-svn: 184347
2013-06-19 20:35:50 +00:00
John Thompson
54c83695f7
Fixed a typo and naming convention.
...
llvm-svn: 184221
2013-06-18 19:56:05 +00:00
Reid Kleckner
e34930bf6f
Add a dependency on LLVM's option library for clang-tools-extra
...
r183989 added a dependency on LLVMOption in clangFrontend.
llvm-svn: 183990
2013-06-14 17:34:04 +00:00
John Thompson
a44f85abd4
Fixed outdate comment, and comment typo.
...
llvm-svn: 179568
2013-04-15 22:32:28 +00:00
John Thompson
52d9886500
modularize - Fixed broken array use (asserted in tests). Renamed KindType enum.
...
llvm-svn: 178259
2013-03-28 18:38:43 +00:00
Michael Gottesman
4b24921965
Revert "modularize - Fixed poor array usage."
...
This has broken buildbots for a few hours.
llvm-svn: 178223
2013-03-28 06:07:15 +00:00
John Thompson
3b1ee2b87f
modularize - Updated futures comment.
...
llvm-svn: 178216
2013-03-28 02:46:25 +00:00
John Thompson
9663d8c46d
modularize - Fixed poor array usage.
...
llvm-svn: 178214
2013-03-28 02:44:31 +00:00