teemperor added a comment.
That's a really nice approach to this problem, good job Yuka! See my inline
comments for some minor remarks.
Comment at: clang/include/clang/Driver/CC1Options.td:104
+ const char* Values =
+#define GET_CHECKERS
+#define CHECKER(FULLNAME, CLASS,
teemperor added a comment.
Very well done, I really like this patch! I added a few remarks mostly about
the comments that need some small adjusting.
I'm wondering what would be a nice way of creating a StmtDataCollector that is
faster but only works for single translation units (e.g. it only
teemperor accepted this revision.
teemperor added a comment.
This revision is now accepted and ready to land.
LGTM, more publicity means that more shells will make use of it.
https://reviews.llvm.org/D36567
___
cfe-commits mailing list
teemperor abandoned this revision.
teemperor added a comment.
I see, thanks for the information! If we don't need to support this in the
shell-completion and we shouldn't report invalid arguments, then it seems this
review is stuck here. I'll abandon as I don't see any other use case for this
teemperor accepted this revision.
teemperor added a comment.
This revision is now accepted and ready to land.
E.g. If you add a flag that lands in between the results it breaks. Add
`-Wmajor-new-feature` and the test goes red. Same with the flag results or
changing the help test for `-std=`.
teemperor added a comment.
In https://reviews.llvm.org/D36067#825867, @xazax.hun wrote:
> I like the directions of this patch.
> In general, I am in favor of explicitly registering the options from user
> defined checkers.
> But changing a config option will now break the command line
teemperor updated this revision to Diff 108839.
teemperor added a comment.
(Fixed diff)
https://reviews.llvm.org/D34182
Files:
include/clang/Analysis/CloneDetection.h
lib/Analysis/CloneDetection.cpp
lib/StaticAnalyzer/Checkers/CloneChecker.cpp
Index:
teemperor updated this revision to Diff 108837.
teemperor added a comment.
Herald added a subscriber: klimek.
- Updated according to Artem's comments.
https://reviews.llvm.org/D34182
Files:
include/clang/Analysis/CloneDetection.h
lib/Analysis/CloneDetection.cpp
teemperor added a comment.
If you can't reproduce, you should try running a debug build through valgrind.
It points out this issue:
==29522== Invalid read of size 4
==29522==at 0x16EBED0: clang::LocationContext::getCurrentStackFrame()
const (in /opt/clang/build/bin/clang-6.0)
teemperor accepted this revision.
teemperor added a comment.
LGTM.
Comment at: clang/utils/bash-autocomplete.sh:60
eval local path=${COMP_WORDS[0]}
- flags=$( "$path" --autocomplete="$arg" 2>/dev/null )
+ flags=$( "$path" --autocomplete="$arg" 2>/dev/null | sed -e
teemperor accepted this revision.
teemperor added a comment.
This revision is now accepted and ready to land.
Thanks for the quick fix, LGTM!
https://reviews.llvm.org/D35762
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
teemperor added a comment.
ping. Any objections to adding this GCC alias?
https://reviews.llvm.org/D34439
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
teemperor accepted this revision.
teemperor added a comment.
This revision is now accepted and ready to land.
I have a last request in my inline comment regarding the documentation,
otherwise this is good to go. Nice work!
Comment at:
teemperor added a comment.
@yamaguchi yes, the reason why we have to treat the `-W...` flags specially
should be documented (as they're not in the OptTable as you said). E.g.
something like `// We have to query the -W flags manually as they're not in the
OptTable.` and then maybe a `TODO: Find
teemperor requested changes to this revision.
teemperor added a comment.
This revision now requires changes to proceed.
It seems the code doesn't compile in clang because on your platform
`std::vector` is implicitly included by some header, on clang+Arch however it
isn`t (see the error at the
teemperor added a comment.
@johannes https://reviews.llvm.org/D34880 has landed, so feel free to propose
patches to the StmtDataCollector API that would help you (e.g. to support
identifiers). You can see examples how to use it in the CloneDetection.cpp
(once for storing data in a
teemperor added a comment.
Yeah, we should move it, but it should land somewhere in a header in `/AST/` so
that for example the StmtProfiler could make use of this. I'm open for
suggestions here :)
https://reviews.llvm.org/D34880
___
cfe-commits
teemperor accepted this revision.
teemperor added a comment.
This revision is now accepted and ready to land.
For the record, one can get a (maybe incomplete) list of options that are
without completion via: `curl "https://teemperor.de/pub/clang_flags.txt; | grep
-v HelpText | grep -v Group`.
teemperor accepted this revision.
teemperor added a comment.
LGTM, everything still works in the latest bash on Linux.
Also thanks for the reviews Rui!
https://reviews.llvm.org/D34924
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
teemperor added a comment.
> I'm not sure what you refer to by ` I just saw we actually have the
> completion code in the Driver`. We are already auto completing both cc1
> options and driver options, right?
Woops, I misread the code there. Never mind!
> What about completing cc1 options only
teemperor added a comment.
Yes, it does indeed skip identifiers and literals for this reason :). It was
planned to make this template more configurable for use cases like yours, so
I'm totally fine with adding configuration parameters. I just opened
https://reviews.llvm.org/D34880 where I make
teemperor added a comment.
I didn't have time to have a close look at this patch, but it seems you're
interested in the specific TU-independent data of a Stmt to compare them. So if
you are interested in the such data and don't want to write your own function
to collect data it for each Stmt
teemperor added a comment.
Two thought from me on this:
1. I think we want to support completing both -cc1 and normal driver
invocation. Most people use the driver, but for example during debugging people
use the cc1 version, so both are valid use cases. I just saw we actually have
the
teemperor accepted this revision.
teemperor added a comment.
Works as intended, good job!
https://reviews.llvm.org/D34607
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
teemperor added a comment.
@ahatanak I think we can leave the more expressive clang name for this warning
and just add the bit cryptic GCC name for compability. But I don't have a
strong opinion on this.
https://reviews.llvm.org/D34439
___
teemperor created this revision.
GCC has named this `-Wnoexcept-type`, so let's add an alias to stay compatible
with the GCC flags.
https://reviews.llvm.org/D34439
Files:
include/clang/Basic/DiagnosticGroups.td
test/SemaCXX/cxx1z-noexcept-function-type.cpp
Index:
teemperor accepted this revision.
teemperor added a comment.
This revision is now accepted and ready to land.
LGTM, thanks!
Repository:
rL LLVM
https://reviews.llvm.org/D34353
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
teemperor added inline comments.
Comment at: cfe/trunk/include/clang/Analysis/CloneDetection.h:324
+struct AutoGeneratedCloneConstraint {
+ StringRef IgnoredFilesPattern;
xiangzhai wrote:
> v.g.vassilev wrote:
> > Shouldn't the name be more generic. What this
teemperor accepted this revision.
teemperor added a comment.
LGTM.
https://reviews.llvm.org/D33383
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
teemperor accepted this revision.
teemperor added a comment.
LGTM, thanks for the patch!
Repository:
rL LLVM
https://reviews.llvm.org/D31320
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
teemperor accepted this revision.
teemperor added a comment.
This revision is now accepted and ready to land.
Please check the last inline comment and then feel free to commit it with the
suggested fix. And I wanted to wait for review on the other performance
patches, so you can push this now.
teemperor added a comment.
See my inline comments about technical changes, but otherwise this looks ready
to land. Please update and I'll give green light ASAP. Thanks!
Comment at: lib/Analysis/CloneDetection.cpp:375
+const Decl *D = S.getContainingDecl();
+const
teemperor updated this revision to Diff 102700.
teemperor marked an inline comment as done.
teemperor added a comment.
- made saveHash static.
https://reviews.llvm.org/D34182
Files:
include/clang/Analysis/CloneDetection.h
lib/Analysis/CloneDetection.cpp
teemperor requested changes to this revision.
teemperor added a comment.
This revision now requires changes to proceed.
Sorry for the delay, we got stuck because hard coding a certain file pattern
into the clang source code doesn't seem to be a optimal solution (e.g. every
user that has a
teemperor added a comment.
Everything beside this last test case seems to be handled. And from what I
remember there was a longer discussion how to properly handle this case and so
this review got stuck.
Can we add this last test case with a FIXME and then get this merged?
teemperor accepted this revision.
teemperor added a comment.
This revision is now accepted and ready to land.
LGTM, good job! (Sorry for the delay, I think I got interrupted here by the
GSoC start...)
https://reviews.llvm.org/D32341
___
teemperor added inline comments.
Comment at: include/clang/Analysis/CloneDetection.h:263
+public:
+ void constrain(std::vector );
+};
v.g.vassilev wrote:
> Could we typedef `std::vector` into
> `CloneDetector::CloneGroups`?
Yes, I'll do this in another patch
teemperor created this revision.
Herald added a subscriber: xazax.hun.
This patch aims at optimizing the CloneChecker for larger programs. Before
this patch we took around 102 seconds to analyze sqlite3 with a complexity
value of 50. After this patch we now take 2.1 seconds to analyze sqlite3.
teemperor updated this revision to Diff 101877.
teemperor added a comment.
- Just unconditionally calling `setHidden` now.
IIRC I had to put the conditions for the module builds because
setLocalOwningModule did trigger some tests/asserts, otherwise but the
setHidden works fine like this.
teemperor created this revision.
This test was silently failing since a long time because it failed to include
stdlib.h (as it's running in a freestanding environment). However, because we
used just `not clang_cc1` instead of the verify mode, this regression was never
noticed and the test was
teemperor updated this revision to Diff 99728.
teemperor edited the summary of this revision.
teemperor added a comment.
- Now unhiding/unowning the created functions like Richard suggested.
- Extended the test case to stress test the lookup with the new visibility
settings.
teemperor added a comment.
I'm not 100% sure if that's the right fix, but I didn't see a obvious way to
declare the new/delete outside the current submodule. Maybe Richard knows a
better way :)
https://reviews.llvm.org/D33366
___
cfe-commits
teemperor created this revision.
In the current local-submodule-visibility mode, as soon as we discover a
virtual destructor, we declare on demand a global delete operator. However,
this causes that this delete operator is owned by the submodule which contains
said virtual destructor. This
teemperor planned changes to this revision.
teemperor added a comment.
Work in progress patch. We probably also need to update a few other places
where we call this.
https://reviews.llvm.org/D33004
___
cfe-commits mailing list
teemperor created this revision.
Calling `Preprocessor::getIdentifierInfo` is not automatically updating the
returned identifier at the moment. This patch adds a flag that is ensuring by
default that the returned IdentifierInfo is updated. The flag is true by
default because that seems like
teemperor created this revision.
As discussed in https://reviews.llvm.org/D30793, we have some unsafe calls to
`isConsumerInterestedIn()`. This patch implements Richard's suggestion (from
the inline comment) that we should track if we just deserialized an
declaration. If we just deserialized,
teemperor updated this revision to Diff 96561.
teemperor added a comment.
- Now using unique_ptr instead of raw pointers.
https://reviews.llvm.org/D32486
Files:
lib/Frontend/PrintPreprocessedOutput.cpp
Index: lib/Frontend/PrintPreprocessedOutput.cpp
teemperor created this revision.
The UnknownPragmaHandlers added by t`DoPrintPreprocessedInput` conflict with
the real PragmaHandlers from clang::Parser because they try to handle the same
`#pragma` directives. This makes it impossible to use a Preprocessor (that was
previously passed to
teemperor requested changes to this revision.
teemperor added a comment.
This revision now requires changes to proceed.
This also disables warnings for `-MD` and `-MMD` which shouldn't happen as
we're actually compiling code here and are probably compiling a project. E.g.
for people that use
teemperor added a comment.
I think most of the changes are just necessary because we replaced
`LLVM_MAIN_SRC_DIR` with `CMAKE_SOURCE_DIR` (all the added `../` and removed
`docs`). On the other hand this is now in sync with the way the the clang
doxygen.cfg is structured and it fixes the
teemperor added inline comments.
Comment at: docs/doxygen.cfg.in:158
+STRIP_FROM_INC_PATH+= @abs_srcdir@/../include/clang
+STRIP_FROM_INC_PATH+= @abs_srcdir@/../include/clang-c
yamaguchi wrote:
> v.g.vassilev wrote:
> > We should be stripping
teemperor added a comment.
Woops, my bad, seems like I tested just before you fixed it.
Because I read in the documentation that we could also pass include paths here,
we could also try something like this:
STRIP_FROM_INC_PATH= @abs_srcdir@/..
STRIP_FROM_INC_PATH+=
teemperor added a comment.
@yamaguchi Did you test the latest revision of this patch and get the desired
output paths? I just tested it and it seems on my system doxygen can't handle
the `@abs_srcdir@/../`.
At least on my system it gets correctly generated as:
STRIP_FROM_PATH=
teemperor added a subscriber: cfe-commits.
teemperor added a comment.
https://reviews.llvm.org/D32113
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
teemperor added a comment.
I think for range loops work differently:
#include
#include
#include
struct Foo {
int* begin() const { assert(false); }
int* end() const { assert(false); }
void bar() const { std::cout << "Different behavior" << std::endl; }
};
int main() {
std::vector
teemperor added inline comments.
Comment at: lib/Analysis/CloneDetection.cpp:395
+
+ for (const Stmt *Child : S->children()) {
+if (Child == nullptr) {
I couldn't reproduce, but from what I assume form the warning and the crash
that we confused the
teemperor updated this revision to Diff 94337.
teemperor added a comment.
- Renamed variable from 'S' to 'Child' to make the buildbots happy (and because
it's more expressive)
- Fixed the name of the unit test.
https://reviews.llvm.org/D23418
Files:
include/clang/Analysis/CloneDetection.h
teemperor added a comment.
Change it to a namespace when merging if you prefer that :). Thanks for the
review!
https://reviews.llvm.org/D23418
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
teemperor updated this revision to Diff 93503.
teemperor added a comment.
- Remove the mysterious unicode-character at the start of CloneDetection.cpp
- Fixed formatting of the comment in CloneDetectionTest.cpp
- Fixed comment in StmtSequence::contains that was still talking about checking
for
teemperor updated this revision to Diff 93302.
teemperor added a comment.
- `auto` to `const auto` to be more consistent with LLVM style.
https://reviews.llvm.org/D23418
Files:
include/clang/Analysis/CloneDetection.h
lib/Analysis/CloneDetection.cpp
teemperor updated this revision to Diff 93270.
teemperor added a comment.
- Remove the `assert(ChildHash)` which is obviously wrong code that just rarely
fails.
https://reviews.llvm.org/D23418
Files:
include/clang/Analysis/CloneDetection.h
lib/Analysis/CloneDetection.cpp
teemperor marked an inline comment as done.
teemperor added a comment.
Well this patch won't change a lot with the false-positives or performance
(it's more refactoring) :)
https://reviews.llvm.org/D23418
___
cfe-commits mailing list
teemperor marked 7 inline comments as done.
teemperor added a comment.
Hey Leslie,
regarding performance: Last time I checked we spend most of the time on the
verification of the hash values. We can do some tricks to make this faster
(like delaying the verification to the end of the
teemperor updated this revision to Diff 93180.
teemperor added a comment.
Herald added a subscriber: mgorny.
Thanks for the review Artem!
Changes:
- No longer including the old LLVM hashing header.
- Fixed the messed up comment formatting when i removed all the `\brief`s...
- `CloneConstraint`
teemperor added a comment.
I just tested this on Mageia and this patch is superseded by now (it was
originally written in 2013). The latest clang release is already able to
correctly handle Mageia.
(Also there is anyway comma missing at the end of each line)
https://reviews.llvm.org/D25604
teemperor updated this revision to Diff 89084.
teemperor added a comment.
- Removed all the deprecated `\brief`s
I couldn't find any actual regression in the code now, so from my side it's ok
to merge it.
https://reviews.llvm.org/D23418
Files:
include/clang/Analysis/CloneDetection.h
teemperor added a comment.
I feel like we have a really similar use case in the
Analysis/CloneDetection{.h/.cpp} with the hashing of statements. I tried
substituting the call to the statement hashing with a call to the
CloneDetection API and it seems that most tests pass and the remaining
301 - 367 of 367 matches
Mail list logo