[PATCH] D31591: Fix a bug which access nullptr and cause segmentation fault

2017-04-03 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 93864. yamaguchi added a comment. Made unified diff for the testcase and SemaInit.cpp. https://reviews.llvm.org/D31591 Files: SemaInit.cpp sema-segvcheck.c Index: sema-segvcheck.c ===

[PATCH] D31591: Fix a bug which access nullptr and cause segmentation fault

2017-04-03 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 93860. yamaguchi added a comment. Moved comment inside if (ExistingInit). https://reviews.llvm.org/D31591 Files: SemaInit.cpp Index: SemaInit.cpp === --- SemaInit.cpp +++ SemaInit.cpp @@

[PATCH] D31591: Fix a bug which access nullptr and cause segmentation fault

2017-04-04 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 94090. yamaguchi added a comment. Add relative path to the file. https://reviews.llvm.org/D31591 Files: clang/test/Sema/sema-segvcheck.c lib/Sema/SemaInit.cpp Index: clang/test/Sema/sema-segvcheck.c

[PATCH] D31591: Fix a bug which access nullptr and cause segmentation fault

2017-04-12 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 95064. yamaguchi added a comment. I've been trying to minimal the testcase, add comments to describe what it is testing, and fix styles of the testcase properly. However, I don't have clear idea what will be the best. I would like to ask for the advice.

[PATCH] D32113: Add path from clang to doxygen document include header

2017-04-16 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi added a comment. Doxygen couldn't handle @abs_srcsdir@/../ , so I changed it to @abs_arcdir@/.. in Diff 95410, then it worked OK. Document will now show the path of #include "include/clang/Sema/Sema.h" . https://reviews.llvm.org/D32113

[PATCH] D32113: Add path from clang to doxygen document include header

2017-04-17 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 95436. yamaguchi added a comment. This will generate #include "clang/Sema/Sema.h" . https://reviews.llvm.org/D32113 Files: docs/doxygen.cfg.in Index: docs/doxygen.cfg.in === ---

[PATCH] D32113: Add path from clang to doxygen document include header

2017-04-17 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 95434. yamaguchi added a comment. It worked, and this code generates #include "Sema/Sema.h". https://reviews.llvm.org/D32113 Files: docs/doxygen.cfg.in Index: docs/doxygen.cfg.in === ---

[PATCH] D32113: Add path from clang to doxygen document include header

2017-04-17 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi 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 v.g.vassilev wrote: > We should be stripping `@abs_srcdir@/../include`

[PATCH] D32342: Fixed llvm/CMakeLists.txt which doesn't generate proper MakeFiles and added relative path to llvm doxygen

2017-04-21 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi created this revision. Herald added a subscriber: mgorny. Fist part is to change CMakeLists.txt and doxygen.cfg.in by following reasons: In llvm/docs/CmakeLists.txt, it was - set(abs_top_srcdir ${LLVM_MAIN_SRC_DIR}) - set(abs_top_builddir ${LLVM_BINARY_DIR}) However,

[PATCH] D32341: Fix a bug that warnings generated with -M or -MM flags

2017-04-21 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi created this revision. This is a patch for bug [1] Warnings should not be emitted with -M and -MM flags, because this mode is only used for generate MakeFiles. [1]: https://bugs.llvm.org/show_bug.cgi?id=6817 https://reviews.llvm.org/D32341 Files: lib/Driver/ToolChains/Clang.cpp

[PATCH] D32342: Changed llvm/CMakeLists.txt and added relative path to llvm doxygen

2017-04-21 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 96124. yamaguchi retitled this revision from "Fixed llvm/CMakeLists.txt which doesn't generate proper MakeFiles and added relative path to llvm doxygen" to "Changed llvm/CMakeLists.txt and added relative path to llvm doxygen". yamaguchi added a comment.

[PATCH] D32342: Changed llvm/CMakeLists.txt and added relative path to llvm doxygen

2017-04-21 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 96128. yamaguchi added a comment. Modified README.txt. I thought its good to specify where the html is. https://reviews.llvm.org/D32342 Files: docs/CMakeLists.txt docs/README.txt docs/doxygen.cfg.in Index: docs/doxygen.cfg.in

[PATCH] D31591: Fix a bug which access nullptr and cause segmentation fault

2017-04-13 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi added a comment. I don't have a commit access. Can you commit? https://reviews.llvm.org/D31591 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32341: Fix a bug that warnings generated with -M or -MM flags

2017-04-21 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 96273. yamaguchi added a comment. Add testcase. https://reviews.llvm.org/D32341 Files: lib/Driver/ToolChains/Clang.cpp test/Driver/m_and_mm.c Index: test/Driver/m_and_mm.c === ---

[PATCH] D32341: Fix a bug that warnings generated with -M or -MM flags

2017-04-22 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 96283. yamaguchi added a comment. Fixed typo. https://reviews.llvm.org/D32341 Files: lib/Driver/ToolChains/Clang.cpp test/Driver/m_and_mm.c Index: test/Driver/m_and_mm.c === ---

[PATCH] D36209: [Bash-autocompletion] Add comment to test so that it is easier to fix

2017-08-02 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 109283. yamaguchi added a comment. Fixed typo. https://reviews.llvm.org/D36209 Files: clang/test/Driver/autocomplete.c Index: clang/test/Driver/autocomplete.c === ---

[PATCH] D36209: [Bash-autocompletion] Add comment to test so that it is easier to fix

2017-08-01 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi created this revision. clang/test/Driver/autocomplete.c is a test for --autocomplete, and this test might break if people add/modify flags or HelpText. So I've add comment for future developers so that they can fix this file according to the change they had made.

[PATCH] D36209: [Bash-autocompletion] Add comment to test so that it is easier to fix

2017-08-02 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 109277. yamaguchi added a comment. Update diff. https://reviews.llvm.org/D36209 Files: clang/test/Driver/autocomplete.c Index: clang/test/Driver/autocomplete.c === ---

[PATCH] D36209: [Bash-autocompletion] Add comment to test so that it is easier to fix

2017-08-02 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi added a comment. @ruiu This test will break for instance, when someone add new value to mrelocation-model because values has to be shown in row 78- 83 order, or when someone made a new flags which start with `-Wno-invalid-pp-` because in row 96 only -Wno-invalid-pp-token is expected

[PATCH] D36209: [Bash-autocompletion] Add comment to test so that it is easier to fix

2017-08-02 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 109281. yamaguchi added a comment. Modified comment. https://reviews.llvm.org/D36209 Files: clang/test/Driver/autocomplete.c Index: clang/test/Driver/autocomplete.c === ---

[PATCH] D36209: [Bash-autocompletion] Add comment to test so that it is easier to fix

2017-08-02 Thread Yuka Takahashi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL309794: [Bash-autocompletion] Add comment to test so that it is easier to fix (authored by yamaguchi). Changed prior to commit: https://reviews.llvm.org/D36209?vs=109283=109285#toc Repository: rL

[PATCH] D36782: [Bash-autocompletion] Add support for static analyzer flags

2017-08-16 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi created this revision. Herald added a subscriber: hiraditya. This is a patch for clang autocomplete feature. It will collect values which -analyzer-checker takes, which is defined in clang/StaticAnalyzer/Checkers/Checkers.inc, dynamically. First, from ValuesCode class in Options.td,

[PATCH] D36782: [Bash-autocompletion] Add support for static analyzer flags

2017-08-16 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 111318. yamaguchi marked 7 inline comments as done. yamaguchi added a comment. Update diff according to Raphael's comments. https://reviews.llvm.org/D36782 Files: clang/include/clang/Driver/CC1Options.td clang/lib/Driver/DriverOptions.cpp

[PATCH] D36567: [Bash-autocompletion] Add --autocomplete flag to 5.0 release notes

2017-08-09 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi created this revision. I thought we should add this information to release notes, because we added a new flag to clang driver. https://reviews.llvm.org/D36567 Files: clang/docs/ReleaseNotes.rst Index: clang/docs/ReleaseNotes.rst

[PATCH] D36567: [Bash-autocompletion] Add --autocomplete flag to 5.0 release notes

2017-08-11 Thread Yuka Takahashi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL310700: [Bash-autocompletion] Add --autocomplete flag to 5.0 release notes (authored by yamaguchi). Changed prior to commit: https://reviews.llvm.org/D36567?vs=110518=110679#toc Repository: rL LLVM

[PATCH] D36820: [Bash-autocompletion] Add support for -std=

2017-08-17 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi created this revision. Add support for autocompleting values of -std= by including LangStandards.def. This patch relies on https://reviews.llvm.org/D36782, and is using two-stage code generation. https://reviews.llvm.org/D36820 Files: clang/include/clang/Driver/Options.td

[PATCH] D36782: [Bash-autocompletion] Add support for static analyzer flags

2017-08-16 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 111457. yamaguchi marked 2 inline comments as done. yamaguchi added a comment. Update diff. https://reviews.llvm.org/D36782 Files: clang/include/clang/Driver/CC1Options.td clang/lib/Driver/DriverOptions.cpp clang/test/Driver/autocomplete.c

[PATCH] D36782: [Bash-autocompletion] Add support for static analyzer flags

2017-08-16 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi added a comment. @ruiu I understand your concern. However by doing this (rather than building functions for each flag), we will be able to get all information in OptTable itself. It is true that this is quite fragile, but adding ValuesCode to new flag is not complicated, so I

[PATCH] D35447: [Bash-autocompletion] Add support for -W and -Wno

2017-07-16 Thread Yuka Takahashi via Phabricator via cfe-commits
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=106805#toc Repository: rL LLVM

[PATCH] D34927: [Bash-autocompletion] Fix a bug that -foo=bar doesn't handled properly

2017-07-09 Thread Yuka Takahashi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307478: [Bash-autocompletion] Fix a bug that -foo=bar doesn't handled properly (authored by yamaguchi). Changed prior to commit: https://reviews.llvm.org/D34927?vs=105208=105771#toc Repository: rL

[PATCH] D34770: [Bash-autocompletion] Auto complete cc1 options if -cc1 is specified

2017-07-09 Thread Yuka Takahashi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307479: [Bash-autocompletion] Auto complete cc1 options if -cc1 is specified (authored by yamaguchi). Changed prior to commit: https://reviews.llvm.org/D34770?vs=105209=105772#toc Repository: rL

[PATCH] D35447: [Bash-autocompletion] Add support for -W and -Wno

2017-07-15 Thread Yuka Takahashi via Phabricator via cfe-commits
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:

[PATCH] D35447: [Bash-autocompletion] Add support for -W and -Wno

2017-07-15 Thread Yuka Takahashi via Phabricator via cfe-commits
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

[PATCH] D35447: [Bash-autocompletion] Add support for -W and -Wno

2017-07-14 Thread Yuka Takahashi via Phabricator via cfe-commits
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

[PATCH] D35448: [Bash-autocompletion] Fixed a bug on bash

2017-07-14 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi created this revision. Maybe I mismerged when merging previous commits by hand. https://reviews.llvm.org/D35448 Files: clang/utils/bash-autocomplete.sh Index: clang/utils/bash-autocomplete.sh === ---

[PATCH] D35448: [Bash-autocompletion] Fixed a bug on bash

2017-07-15 Thread Yuka Takahashi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308091: [Bash-autocompletion] Fixed a bug on bash (authored by yamaguchi). Changed prior to commit: https://reviews.llvm.org/D35448?vs=106752=106762#toc Repository: rL LLVM

[PATCH] D35447: [Bash-autocompletion] Add support for -W and -Wno

2017-07-15 Thread Yuka Takahashi via Phabricator via cfe-commits
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 ___

[PATCH] D35447: [Bash-autocompletion] Add support for -W and -Wno

2017-07-15 Thread Yuka Takahashi via Phabricator via cfe-commits
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:

[PATCH] D35759: [Bash-autocompletion] Show HelpText with possible flags

2017-07-21 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi created this revision. Herald added a subscriber: hiraditya. `clang --autocomplete=-std` will show -std: Language standard to compile for -std= Language standard to compile for -stdlib=C++ standard library to use by this change. However, showing HelpText with

[PATCH] D35762: [Bash-autocompletion] Fixed typo and add '-' after -Wno

2017-07-22 Thread Yuka Takahashi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308824: [Bash-autocompletion] Fixed typo and add '-' after -Wno (authored by yamaguchi). Changed prior to commit: https://reviews.llvm.org/D35762?vs=107780=107782#toc Repository: rL LLVM

[PATCH] D35759: [Bash-autocompletion] Show HelpText with possible flags

2017-07-22 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 107779. yamaguchi added a comment. Add newline after the end of the line. https://reviews.llvm.org/D35759 Files: clang/lib/Driver/Driver.cpp clang/test/Driver/autocomplete.c clang/utils/bash-autocomplete.sh llvm/lib/Option/OptTable.cpp Index:

[PATCH] D35759: [Bash-autocompletion] Show HelpText with possible flags

2017-07-22 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 107778. yamaguchi added a comment. Fixed test and update diff according to Rui's comment. https://reviews.llvm.org/D35759 Files: clang/lib/Driver/Driver.cpp clang/test/Driver/autocomplete.c clang/utils/bash-autocomplete.sh

[PATCH] D35759: [Bash-autocompletion] Show HelpText with possible flags

2017-07-22 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi added inline comments. Comment at: llvm/lib/Option/OptTable.cpp:240 if (StringRef(S).startswith(Cur)) -Ret.push_back(S); +Ret.push_back(S + "\t" + std::string(StringRef(In.HelpText))); } ruiu wrote: > I believe > >

[PATCH] D35759: [Bash-autocompletion] Show HelpText with possible flags

2017-07-26 Thread Yuka Takahashi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL309113: [Bash-autocompletion] Show HelpText with possible flags (authored by yamaguchi). Changed prior to commit: https://reviews.llvm.org/D35759?vs=107791=108267#toc Repository: rL LLVM

[PATCH] D35763: [Bash-completion] Fixed a bug that file doesn't autocompleted after =

2017-07-26 Thread Yuka Takahashi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL309112: [Bash-completion] Fixed a bug that file doesn't autocompleted after = (authored by yamaguchi). Changed prior to commit: https://reviews.llvm.org/D35763?vs=107787=108266#toc Repository: rL

[PATCH] D35759: [Bash-autocompletion] Show HelpText with possible flags

2017-07-22 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 107791. yamaguchi added a comment. Update diff according to Rui's comment. https://reviews.llvm.org/D35759 Files: clang/lib/Driver/Driver.cpp clang/test/Driver/autocomplete.c clang/utils/bash-autocomplete.sh llvm/lib/Option/OptTable.cpp Index:

[PATCH] D35763: [Bash-completion] Fixed a bug that file doesn't autocompleted after =

2017-07-22 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi created this revision. File path wasn't autocompleted after `-fmodule-cache-path=[tab]`, so fixed this bug by checking if $flags contains only a newline or not. https://reviews.llvm.org/D35763 Files: clang/utils/bash-autocomplete.sh Index: clang/utils/bash-autocomplete.sh

[PATCH] D35759: [Bash-autocompletion] Show HelpText with possible flags

2017-07-22 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 107790. yamaguchi added a comment. Update diff. Use llvm::join because we don't want to print two '\n's. https://reviews.llvm.org/D35759 Files: clang/lib/Driver/Driver.cpp clang/test/Driver/autocomplete.c clang/utils/bash-autocomplete.sh

[PATCH] D35759: [Bash-autocompletion] Show HelpText with possible flags

2017-07-22 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi added a comment. @ruiu Yeah, we are planning to merge this to 5.0, so that clang Driver interface will be compatible among further versions. https://reviews.llvm.org/D35759 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D35762: [Bash-autocompletion] Fixed typo and add '-' after -Wno

2017-07-22 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi created this revision. -Wno- was autocompleted as -Wno, so fixed this typo. https://reviews.llvm.org/D35762 Files: clang/lib/Basic/DiagnosticIDs.cpp clang/test/Driver/autocomplete.c Index: clang/test/Driver/autocomplete.c

[PATCH] D35759: [Bash-autocompletion] Show HelpText with possible flags

2017-07-22 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 107781. yamaguchi added a comment. Update diff. Delete trailing whitespace so that -stdlib= autocompletion works correctly. https://reviews.llvm.org/D35759 Files: clang/lib/Driver/Driver.cpp clang/test/Driver/autocomplete.c

[PATCH] D34770: [Bash-autocompletion] Auto complete cc1 options if -cc1 is specified

2017-06-28 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi created this revision. Herald added a subscriber: hiraditya. We don't want to autocomplete flags whose Flags class has `NoDriverOption` when argv[1] is not `-cc1`. Another idea for this implementation is to make --autocomplete a cc1 option and handle it in clang Frontend, by porting

[PATCH] D34770: [Bash-autocompletion] Auto complete cc1 options if -cc1 is specified

2017-06-28 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 104490. yamaguchi added a comment. Update patch. https://reviews.llvm.org/D34770 Files: clang/lib/Driver/Driver.cpp clang/test/Driver/autocomplete.c clang/utils/bash-autocomplete.sh llvm/include/llvm/Option/OptTable.h

[PATCH] D34770: [Bash-autocompletion] Auto complete cc1 options if -cc1 is specified

2017-06-30 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi added a comment. @teemperor > 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 > completion code in

[PATCH] D34924: [Bash-autocompletion] Check if bash-completion is installed or not

2017-07-01 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 104988. yamaguchi added a comment. Update patch and diff. https://reviews.llvm.org/D34924 Files: clang/utils/bash-autocomplete.sh Index: clang/utils/bash-autocomplete.sh === ---

[PATCH] D34924: [Bash-autocompletion] Add support for older bash version.

2017-07-01 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 104993. yamaguchi added a comment. Update diff. https://reviews.llvm.org/D34924 Files: clang/utils/bash-autocomplete.sh Index: clang/utils/bash-autocomplete.sh === ---

[PATCH] D34924: [Bash-autocompletion] Check if bash-completion is installed

2017-07-01 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi created this revision. Bash-autocompletion for clang depends on bash-completion system and abort `bash: _init_completion: command not found` when it is not installed. Changed to return silently if bash-completion is not installed. https://reviews.llvm.org/D34924 Files:

[PATCH] D34925: [Bash-completion] Fixed a bug that ~ doesn't expanded to $HOME

2017-07-01 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi created this revision. `~/build/bin/clang -f[tab]` was executed without ~ expanded to $HOME, so changed this by expanding ~ to path using eval. https://reviews.llvm.org/D34925 Files: clang/utils/bash-autocomplete.sh Index: clang/utils/bash-autocomplete.sh

[PATCH] D34924: [Bash-autocompletion] Add support for older bash version.

2017-07-01 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi added inline comments. Comment at: clang/utils/bash-autocomplete.sh:3 + +_clang_filedir() +{ ruiu wrote: > Is the output of `compgen -f` the same as `_filedir`? If so, can you always > use `compgen -f`? _filedir is better than `compgen -f`, because it

[PATCH] D34924: [Bash-autocompletion] Add support for older bash version.

2017-07-01 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 104992. yamaguchi marked 2 inline comments as done. yamaguchi added a comment. Update diff. https://reviews.llvm.org/D34924 Files: clang/utils/bash-autocomplete.sh Index: clang/utils/bash-autocomplete.sh

[PATCH] D34924: [Bash-autocompletion] Add support for older bash version.

2017-07-01 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 104994. yamaguchi marked an inline comment as done. yamaguchi added a comment. Update patch. https://reviews.llvm.org/D34924 Files: clang/utils/bash-autocomplete.sh Index: clang/utils/bash-autocomplete.sh

[PATCH] D34770: [Bash-autocompletion] Auto complete cc1 options if -cc1 is specified

2017-07-01 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 104982. yamaguchi added a comment. Update diff. Autocomplete cc1 flags when argv[1] is -cc1 or previous flag is -Xclang. https://reviews.llvm.org/D34770 Files: clang/lib/Driver/Driver.cpp clang/test/Driver/autocomplete.c

[PATCH] D34770: [Bash-autocompletion] Auto complete cc1 options if -cc1 is specified

2017-07-01 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 104983. yamaguchi added a comment. Update code comments. https://reviews.llvm.org/D34770 Files: clang/lib/Driver/Driver.cpp clang/test/Driver/autocomplete.c clang/utils/bash-autocomplete.sh llvm/include/llvm/Option/OptTable.h

[PATCH] D34924: [Bash-autocompletion] Add support for older bash version.

2017-07-01 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 104996. yamaguchi added a comment. _get_comp_words_by_ref still depends on older bash-completion package, so delete this and set cword and cur manualy. https://reviews.llvm.org/D34924 Files: clang/utils/bash-autocomplete.sh Index:

[PATCH] D34925: [Bash-completion] Fixed a bug that ~ doesn't expanded to $HOME

2017-07-01 Thread Yuka Takahashi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL306957: [Bash-completion] Fixed a bug that ~ doesn't expanded to $HOME (authored by yamaguchi). Changed prior to commit: https://reviews.llvm.org/D34925?vs=104991=104997#toc Repository: rL LLVM

[PATCH] D34924: [Bash-autocompletion] Add support for older bash version.

2017-07-01 Thread Yuka Takahashi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL306962: [Bash-autocompletion] Add support for older bash version. (authored by yamaguchi). Changed prior to commit: https://reviews.llvm.org/D34924?vs=104996=104999#toc Repository: rL LLVM

[PATCH] D34927: [Bash-autocompletion] Fix a bug that -foo=bar doesn't handled properly

2017-07-01 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi created this revision. Fixed a bug that -foo=bar wasn't handled properly on old version of bash. https://reviews.llvm.org/D34927 Files: clang/utils/bash-autocomplete.sh Index: clang/utils/bash-autocomplete.sh === ---

[PATCH] D34930: [Bash-autocompletion] Show flags which has HelpText or GroupID

2017-07-01 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi created this revision. Herald added a subscriber: hiraditya. Otherwise internal flags will be also completed. https://reviews.llvm.org/D34930 Files: llvm/lib/Option/OptTable.cpp Index: llvm/lib/Option/OptTable.cpp

[PATCH] D34930: [Bash-autocompletion] Show flags which has HelpText or GroupID

2017-07-05 Thread Yuka Takahashi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307116: [Bash-autocompletion] Show flags which has HelpText or GroupID (authored by yamaguchi). Changed prior to commit: https://reviews.llvm.org/D34930?vs=105017=105211#toc Repository: rL LLVM

[PATCH] D34770: [Bash-autocompletion] Auto complete cc1 options if -cc1 is specified

2017-07-05 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 105209. yamaguchi added a comment. Fixed typo. https://reviews.llvm.org/D34770 Files: clang/lib/Driver/Driver.cpp clang/test/Driver/autocomplete.c clang/utils/bash-autocomplete.sh llvm/include/llvm/Option/OptTable.h llvm/lib/Option/OptTable.cpp

[PATCH] D34930: [Bash-autocompletion] Show flags which has HelpText or GroupID

2017-07-05 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi added a comment. We are going to ask community which flags should be autocompleted or not, and tidy Options.td. https://reviews.llvm.org/D34930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34770: [Bash-autocompletion] Auto complete cc1 options if -cc1 is specified

2017-07-05 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi added inline comments. Comment at: clang/utils/bash-autocomplete.sh:16 + if [[ "${COMP_WORDS[1]}" == "-cc1" || "$w1" == "-Xclang" ]]; then +arg="#" + fi compnerd wrote: > `prefix` may be a better term? Thanks for reviewing! $arg has string like

[PATCH] D34927: [Bash-autocompletion] Fix a bug that -foo=bar doesn't handled properly

2017-07-05 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 105208. yamaguchi added a comment. Update diff. Thanks for the pointing out. https://reviews.llvm.org/D34927 Files: clang/utils/bash-autocomplete.sh Index: clang/utils/bash-autocomplete.sh

[PATCH] D34761: [Bash-autocompletion] Invoke clang where user called

2017-06-28 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi created this revision. When user build clang and used completion Eg. `build/bin/clang -fno[tab]`, we want to invoke `build/bin/clang --autocomplete=-fno`, rather than `clang --autocomplete=-fno`. https://reviews.llvm.org/D34761 Files: clang/utils/bash-autocomplete.sh Index:

[PATCH] D34761: [Bash-autocompletion] Invoke clang where user called

2017-06-28 Thread Yuka Takahashi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL306559: [Bash-autocompletion] Invoke clang where user called (authored by yamaguchi). Changed prior to commit: https://reviews.llvm.org/D34761?vs=104438=104439#toc Repository: rL LLVM

[PATCH] D34607: [Bash-autocompletion] Check clang version in Bash

2017-06-28 Thread Yuka Takahashi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL306555: [Bash-autocompletion] Check clang version in Bash (authored by yamaguchi). Changed prior to commit: https://reviews.llvm.org/D34607?vs=103884=104435#toc Repository: rL LLVM

[PATCH] D32341: Fix a bug that warnings generated with -M or -MM flags

2017-04-24 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi added a comment. Do you think it is not a good idea to change condition if -MD or -MMD exists? for example, if ( !A->getOption().matches(options::OPT_MD) && !A->getOption().matches(options::OPT_MQ)) CmdArgs.push_back("-w"); https://reviews.llvm.org/D32341

[PATCH] D32646: Fix a bug that -Wmissing-braces fires on system headers

2017-04-28 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 97182. yamaguchi added a comment. Update testcase. Made it minimal. https://reviews.llvm.org/D32646 Files: lib/Sema/SemaInit.cpp test/Sema/warn-missing-braces.c Index: test/Sema/warn-missing-braces.c

[PATCH] D32341: Fix a bug that warnings generated with -M or -MM flags

2017-04-27 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 97013. yamaguchi added a comment. show warnings with -M and -MD https://reviews.llvm.org/D32341 Files: lib/Driver/ToolChains/Clang.cpp test/Driver/m_and_mm.c Index: test/Driver/m_and_mm.c

[PATCH] D32646: Fix a bug that -Wmissing-braces fires on system headers

2017-04-28 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi created this revision. This is an update patch for bug [1]. -Wmissing-braces should not fire for system headers. [1] https://bugs.llvm.org/show_bug.cgi?id=24007 https://reviews.llvm.org/D32646 Files: lib/Sema/SemaInit.cpp test/Sema/warn-missing-braces.c Index:

[PATCH] D32341: Fix a bug that warnings generated with -M or -MM flags

2017-04-27 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 97019. yamaguchi added a comment. Add testcase https://reviews.llvm.org/D32341 Files: lib/Driver/ToolChains/Clang.cpp test/Driver/m_and_mm.c Index: test/Driver/m_and_mm.c === ---

[PATCH] D32646: Fix a bug that -Wmissing-braces fires on system headers

2017-04-30 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi marked 2 inline comments as done. yamaguchi added inline comments. Comment at: lib/Sema/SemaInit.cpp:892 + SpellingLoc = SemaRef.getSourceManager().getSpellingLoc(SpellingLoc); + if (!(SpellingLoc.isValid() && +

[PATCH] D32646: Fix a bug that -Wmissing-braces fires on system headers

2017-04-30 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi added inline comments. Comment at: lib/Sema/SemaInit.cpp:892 + SpellingLoc = SemaRef.getSourceManager().getSpellingLoc(SpellingLoc); + if (!(SpellingLoc.isValid() && +SemaRef.getSourceManager().isInSystemHeader(SpellingLoc))) {

[PATCH] D32646: Fix a bug that -Wmissing-braces fires on system headers

2017-04-30 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi added inline comments. Comment at: lib/Sema/SemaInit.cpp:892 + SpellingLoc = SemaRef.getSourceManager().getSpellingLoc(SpellingLoc); + if (!(SpellingLoc.isValid() && +SemaRef.getSourceManager().isInSystemHeader(SpellingLoc))) {

[PATCH] D32646: Fix a bug that -Wmissing-braces fires on system headers

2017-04-30 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 97224. yamaguchi added a comment. @v.g.vassilev I don't think early return is good idea, because someone might want to add some code under this function in the future. https://reviews.llvm.org/D32646 Files: lib/Sema/SemaInit.cpp

[PATCH] D32646: Fix a bug that -Wmissing-braces fires on system headers

2017-04-30 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 97227. yamaguchi marked 5 inline comments as done. yamaguchi added a comment. Changed to early return. https://reviews.llvm.org/D32646 Files: lib/Sema/SemaInit.cpp test/Sema/warn-missing-braces.c Index: test/Sema/warn-missing-braces.c

[PATCH] D32646: Fix a bug that -Wmissing-braces fires on system headers

2017-04-30 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 97228. yamaguchi added a comment. Add check if there is -Wmissing-braces enabled or not. https://reviews.llvm.org/D32646 Files: lib/Sema/SemaInit.cpp test/Sema/warn-missing-braces.c Index: test/Sema/warn-missing-braces.c

[PATCH] D36820: [Bash-autocompletion] Add support for -std=

2017-08-18 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi added inline comments. Comment at: llvm/utils/TableGen/OptParserEmitter.cpp:319-320 OS << ", Values);\n"; OS << "(void)ValuesWereAdded;\nassert(ValuesWereAdded &&"; OS << " \"Couldn't add values to OptTable!\");\n"; }

[PATCH] D36820: [Bash-autocompletion] Add support for -std=

2017-08-18 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 111804. yamaguchi added a comment. Update diff. Thank you for your comments! https://reviews.llvm.org/D36820 Files: clang/include/clang/Driver/Options.td clang/test/Driver/autocomplete.c llvm/utils/TableGen/OptParserEmitter.cpp Index:

[PATCH] D36782: [Bash-autocompletion] Add support for static analyzer flags

2017-08-18 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi added a comment. @ruiu I addressed your comments in https://reviews.llvm.org/D36820, so please take a look at it. Thank you! https://reviews.llvm.org/D36782 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D36820: [Bash-autocompletion] Add support for -std=

2017-08-17 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 111611. yamaguchi marked 3 inline comments as done. yamaguchi added a comment. Update diff. https://reviews.llvm.org/D36820 Files: clang/include/clang/Driver/Options.td clang/test/Driver/autocomplete.c llvm/utils/TableGen/OptParserEmitter.cpp

[PATCH] D36782: [Bash-autocompletion] Add support for static analyzer flags

2017-08-23 Thread Yuka Takahashi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. yamaguchi marked an inline comment as done. Closed by commit rL311552: [Bash-autocompletion] Add support for static analyzer flags (authored by yamaguchi). Changed prior to commit:

[PATCH] D34557: Sort the autocomplete candidates before printing them out.

2017-06-23 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi accepted this revision. yamaguchi added a comment. This revision is now accepted and ready to land. LGTM! Thanks for the patch. https://reviews.llvm.org/D34557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34607: [Bash-autocompletion] Check clang version in Bash

2017-06-25 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 103884. yamaguchi added a comment. Update patch. https://reviews.llvm.org/D34607 Files: clang/utils/bash-autocomplete.sh Index: clang/utils/bash-autocomplete.sh === ---

[PATCH] D34607: [Bash-autocompletion] Check clang version in Bash

2017-06-25 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi created this revision. Add check if user's clang version supports --autocomplete or not. If not, we just autocomplete files. https://reviews.llvm.org/D34607 Files: clang/utils/bash-autocomplete.sh Index: clang/utils/bash-autocomplete.sh

[PATCH] D33383: [GSoC] Flag value completion for clang

2017-06-20 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi closed this revision. yamaguchi added a comment. Landed in https://reviews.llvm.org/rL305805. https://reviews.llvm.org/D33383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34055: Be more strict when checking the -flto option value

2017-06-09 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 102051. yamaguchi added a comment. I think we don't need additional testcase, because this is non-functional change. Driver.cpp will emit error if value was not "thin" nor "full". This testcase is at clang/test/CodeGen/thinlto-backend-option.ll.

[PATCH] D33383: [GSoC] Flag value completion for clang

2017-06-17 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 102944. yamaguchi marked 3 inline comments as done. yamaguchi added a comment. Herald added a subscriber: hiraditya. Update patch and add support for `clang -stdlib=[tab]` case. In this case we expect to see all possible values. (Eg. `libc++ libstdc++

[PATCH] D33383: [GSoC] Flag value completion for clang

2017-06-17 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi added inline comments. Comment at: clang/test/Driver/autocomplete.c:7 // NONE: foo +// RUN: %clang --autocomplete=l,=,-stdlib | FileCheck %s -check-prefix=STDLIB +// STDLIB: libc++ libstdc++ ruiu wrote: > Why do you want to pass the arguments in the

[PATCH] D33383: [GSoC] Flag value completion for clang

2017-06-17 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi marked 2 inline comments as done. yamaguchi added inline comments. Comment at: llvm/lib/Option/OptTable.cpp:198 + continue; +std::string S = "-" + std::string(In.Name); +std::string C = (Command[1] == "=") ? yamaguchi wrote: > teemperor

  1   2   >