[clang-tools-extra] [pseudo] gen Main.cpp (PR #74983)
https://github.com/asl closed https://github.com/llvm/llvm-project/pull/74983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang-tools-extra] [pseudo] gen Main.cpp (PR #74983)
asl wrote: Will you please provide meaningful description in the PRs from now on? Since this is not the first time you've been asked to do this and you are ignoring these requests I'm closing this PR. Please do not use PRs to debug your own issues, this is wasting both time of reviewers as well as CI time. Feel free to reopen when / if you will be able to fix these issues. For more information about proper way to contribute to LLVM consider familiarizing yourself with: * https://llvm.org/docs/Contributing.html#how-to-submit-a-patch * https://llvm.org/docs/CodeReview.html Thanks. https://github.com/llvm/llvm-project/pull/74983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang-tools-extra] [pseudo] gen Main.cpp (PR #74983)
https://github.com/xu-chiheng updated https://github.com/llvm/llvm-project/pull/74983 From 164ce88e00c341b2507618f67a8971d55f9aee9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=8C=81=E6=81=92=20Xu=20Chiheng?= Date: Sun, 10 Dec 2023 15:27:25 +0800 Subject: [PATCH 1/2] 1 --- clang-tools-extra/pseudo/gen/Main.cpp | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clang-tools-extra/pseudo/gen/Main.cpp b/clang-tools-extra/pseudo/gen/Main.cpp index 25cb26563837a6..c9367ca16ed85e 100644 --- a/clang-tools-extra/pseudo/gen/Main.cpp +++ b/clang-tools-extra/pseudo/gen/Main.cpp @@ -70,13 +70,13 @@ namespace { // keyword: `INT` becomes `INT`; // terminal: `IDENTIFIER` becomes `IDENTIFIER`; std::string mangleSymbol(SymbolID SID, const Grammar ) { - static auto = *new std::vector{ -#define TOK(X) llvm::StringRef(#X).upper(), -#define KEYWORD(Keyword, Condition) llvm::StringRef(#Keyword).upper(), + static char const * TokNames[] = { +#define TOK(X) #X , +#define KEYWORD(Keyword, Condition) #Keyword , #include "clang/Basic/TokenKinds.def" }; if (isToken(SID)) -return TokNames[symbolToToken(SID)]; +return llvm::StringRef(TokNames[symbolToToken(SID)]).upper(); std::string Name = G.symbolName(SID).str(); // translation-unit -> translation_unit std::replace(Name.begin(), Name.end(), '-', '_'); From 94362c452d9743c6ee78f084e9e90baafeb45beb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=8C=81=E6=81=92=20Xu=20Chiheng?= Date: Sun, 10 Dec 2023 15:38:56 +0800 Subject: [PATCH 2/2] 1 --- clang-tools-extra/pseudo/gen/Main.cpp | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clang-tools-extra/pseudo/gen/Main.cpp b/clang-tools-extra/pseudo/gen/Main.cpp index c9367ca16ed85e..2c0bf662ef405d 100644 --- a/clang-tools-extra/pseudo/gen/Main.cpp +++ b/clang-tools-extra/pseudo/gen/Main.cpp @@ -70,11 +70,11 @@ namespace { // keyword: `INT` becomes `INT`; // terminal: `IDENTIFIER` becomes `IDENTIFIER`; std::string mangleSymbol(SymbolID SID, const Grammar ) { - static char const * TokNames[] = { -#define TOK(X) #X , -#define KEYWORD(Keyword, Condition) #Keyword , + static char const *TokNames[] = { +#define TOK(X) #X, +#define KEYWORD(Keyword, Condition) #Keyword, #include "clang/Basic/TokenKinds.def" - }; + }; if (isToken(SID)) return llvm::StringRef(TokNames[symbolToToken(SID)]).upper(); std::string Name = G.symbolName(SID).str(); ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang-tools-extra] [pseudo] gen Main.cpp (PR #74983)
https://github.com/xu-chiheng updated https://github.com/llvm/llvm-project/pull/74983 From 02cbefc8112d73b11f835da30db4ed3344db9d48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=8C=81=E6=81=92=20Xu=20Chiheng?= Date: Sun, 10 Dec 2023 15:27:25 +0800 Subject: [PATCH 1/2] 1 --- clang-tools-extra/pseudo/gen/Main.cpp | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clang-tools-extra/pseudo/gen/Main.cpp b/clang-tools-extra/pseudo/gen/Main.cpp index 25cb26563837a..c9367ca16ed85 100644 --- a/clang-tools-extra/pseudo/gen/Main.cpp +++ b/clang-tools-extra/pseudo/gen/Main.cpp @@ -70,13 +70,13 @@ namespace { // keyword: `INT` becomes `INT`; // terminal: `IDENTIFIER` becomes `IDENTIFIER`; std::string mangleSymbol(SymbolID SID, const Grammar ) { - static auto = *new std::vector{ -#define TOK(X) llvm::StringRef(#X).upper(), -#define KEYWORD(Keyword, Condition) llvm::StringRef(#Keyword).upper(), + static char const * TokNames[] = { +#define TOK(X) #X , +#define KEYWORD(Keyword, Condition) #Keyword , #include "clang/Basic/TokenKinds.def" }; if (isToken(SID)) -return TokNames[symbolToToken(SID)]; +return llvm::StringRef(TokNames[symbolToToken(SID)]).upper(); std::string Name = G.symbolName(SID).str(); // translation-unit -> translation_unit std::replace(Name.begin(), Name.end(), '-', '_'); From 078dd3071d270c720f395e0cd98c5fdfcb3b1f7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=8C=81=E6=81=92=20Xu=20Chiheng?= Date: Sun, 10 Dec 2023 15:38:56 +0800 Subject: [PATCH 2/2] 1 --- clang-tools-extra/pseudo/gen/Main.cpp | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clang-tools-extra/pseudo/gen/Main.cpp b/clang-tools-extra/pseudo/gen/Main.cpp index c9367ca16ed85..2c0bf662ef405 100644 --- a/clang-tools-extra/pseudo/gen/Main.cpp +++ b/clang-tools-extra/pseudo/gen/Main.cpp @@ -70,11 +70,11 @@ namespace { // keyword: `INT` becomes `INT`; // terminal: `IDENTIFIER` becomes `IDENTIFIER`; std::string mangleSymbol(SymbolID SID, const Grammar ) { - static char const * TokNames[] = { -#define TOK(X) #X , -#define KEYWORD(Keyword, Condition) #Keyword , + static char const *TokNames[] = { +#define TOK(X) #X, +#define KEYWORD(Keyword, Condition) #Keyword, #include "clang/Basic/TokenKinds.def" - }; + }; if (isToken(SID)) return llvm::StringRef(TokNames[symbolToToken(SID)]).upper(); std::string Name = G.symbolName(SID).str(); ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang-tools-extra] [pseudo] gen Main.cpp (PR #74983)
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 2f69dc21876669a8252a0773001ba73781085ac7 02cbefc8112d73b11f835da30db4ed3344db9d48 -- clang-tools-extra/pseudo/gen/Main.cpp `` View the diff from clang-format here. ``diff diff --git a/clang-tools-extra/pseudo/gen/Main.cpp b/clang-tools-extra/pseudo/gen/Main.cpp index c9367ca16e..2c0bf662ef 100644 --- a/clang-tools-extra/pseudo/gen/Main.cpp +++ b/clang-tools-extra/pseudo/gen/Main.cpp @@ -70,11 +70,11 @@ namespace { // keyword: `INT` becomes `INT`; // terminal: `IDENTIFIER` becomes `IDENTIFIER`; std::string mangleSymbol(SymbolID SID, const Grammar ) { - static char const * TokNames[] = { -#define TOK(X) #X , -#define KEYWORD(Keyword, Condition) #Keyword , + static char const *TokNames[] = { +#define TOK(X) #X, +#define KEYWORD(Keyword, Condition) #Keyword, #include "clang/Basic/TokenKinds.def" - }; + }; if (isToken(SID)) return llvm::StringRef(TokNames[symbolToToken(SID)]).upper(); std::string Name = G.symbolName(SID).str(); `` https://github.com/llvm/llvm-project/pull/74983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang-tools-extra] [pseudo] gen Main.cpp (PR #74983)
https://github.com/xu-chiheng created https://github.com/llvm/llvm-project/pull/74983 None From 02cbefc8112d73b11f835da30db4ed3344db9d48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=8C=81=E6=81=92=20Xu=20Chiheng?= Date: Sun, 10 Dec 2023 15:27:25 +0800 Subject: [PATCH] 1 --- clang-tools-extra/pseudo/gen/Main.cpp | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clang-tools-extra/pseudo/gen/Main.cpp b/clang-tools-extra/pseudo/gen/Main.cpp index 25cb26563837a6..c9367ca16ed85e 100644 --- a/clang-tools-extra/pseudo/gen/Main.cpp +++ b/clang-tools-extra/pseudo/gen/Main.cpp @@ -70,13 +70,13 @@ namespace { // keyword: `INT` becomes `INT`; // terminal: `IDENTIFIER` becomes `IDENTIFIER`; std::string mangleSymbol(SymbolID SID, const Grammar ) { - static auto = *new std::vector{ -#define TOK(X) llvm::StringRef(#X).upper(), -#define KEYWORD(Keyword, Condition) llvm::StringRef(#Keyword).upper(), + static char const * TokNames[] = { +#define TOK(X) #X , +#define KEYWORD(Keyword, Condition) #Keyword , #include "clang/Basic/TokenKinds.def" }; if (isToken(SID)) -return TokNames[symbolToToken(SID)]; +return llvm::StringRef(TokNames[symbolToToken(SID)]).upper(); std::string Name = G.symbolName(SID).str(); // translation-unit -> translation_unit std::replace(Name.begin(), Name.end(), '-', '_'); ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits