This revision was automatically updated to reflect the committed changes.
Closed by commit rL308139: [Bash-autocompletion] Add support for -W
and -Wno (authored by yamaguchi).
Changed prior to commit:
https://reviews.llvm.org/D35447?vs=106774&id=106805#toc
Repository:
rL LLVM
https://review
ruiu accepted this revision.
ruiu added a comment.
LGTM
Comment at: clang/lib/Driver/Driver.cpp:1283
+ for (StringRef S : DiagnosticIDs::getDiagnosticFlags())
+if (StringRef(S).startswith(PassedFlags))
+ SuggestedCompletions.push_back(S);
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: clang/include/clang/Basic/DiagnosticIDs.h:
yamaguchi updated this revision to Diff 106774.
yamaguchi added a comment.
Fixed indent.
https://reviews.llvm.org/D35447
Files:
clang/include/clang/Basic/DiagnosticIDs.h
clang/lib/Basic/DiagnosticIDs.cpp
clang/lib/Driver/Driver.cpp
clang/test/Driver/autocomplete.c
Index: clang/test/Dr
yamaguchi updated this revision to Diff 106764.
yamaguchi added a comment.
Add code comment.
https://reviews.llvm.org/D35447
Files:
clang/include/clang/Basic/DiagnosticIDs.h
clang/lib/Basic/DiagnosticIDs.cpp
clang/lib/Driver/Driver.cpp
clang/test/Driver/autocomplete.c
Index: clang/tes
yamaguchi updated this revision to Diff 106763.
yamaguchi added a comment.
Update diff according to Rui and teemperor's comments.
https://reviews.llvm.org/D35447
Files:
clang/include/clang/Basic/DiagnosticIDs.h
clang/lib/Basic/DiagnosticIDs.cpp
clang/lib/Driver/Driver.cpp
clang/test/Dri
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
yamaguchi added a comment.
@teemperor
I forgot to include in DiagnosticIDs, thanks!
What do you mean `reuse the normal flags` ?
Do you think we should define these -W in Options.td like other flags?
https://reviews.llvm.org/D35447
___
cfe-commits
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 en
ruiu added inline comments.
Comment at: clang/include/clang/Basic/DiagnosticIDs.h:266
+ static std::vector getDiagnosticFlags();
+
Please write a function comment just like other member functions in this class.
Comment at: clang/lib/Basic/Di
yamaguchi created this revision.
`-W[tab]` will autocomplete warnings defined in this link:
https://clang.llvm.org/docs/DiagnosticsReference.html#wweak-vtables
https://reviews.llvm.org/D35447
Files:
clang/include/clang/Basic/DiagnosticIDs.h
clang/lib/Basic/DiagnosticIDs.cpp
clang/lib/Driv
11 matches
Mail list logo