[PATCH] D26465: [Diag] Optimize DiagnosticIDs::getDiagnosticSeverity

2016-11-29 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart added a comment. Ping 2 https://reviews.llvm.org/D26465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26350: Keep invalid Switch in the AST

2016-12-22 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart added a comment. ping2 https://reviews.llvm.org/D26350 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26465: [Diag] Optimize DiagnosticIDs::getDiagnosticSeverity

2016-12-22 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart marked an inline comment as done. ogoffart added a comment. In https://reviews.llvm.org/D26465#607860, @arphaman wrote: > What did you test the parsing on? Will this patch get similar improvements > for code that compiles without errors and warnings? It was benchamerked with

[PATCH] D26465: [Diag] Optimize DiagnosticIDs::getDiagnosticSeverity

2016-12-22 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart updated this revision to Diff 82325. ogoffart marked an inline comment as done. https://reviews.llvm.org/D26465 Files: include/clang/Basic/Diagnostic.h include/clang/Basic/DiagnosticIDs.h lib/Basic/Diagnostic.cpp lib/Basic/DiagnosticIDs.cpp lib/Serialization/ASTReader.cpp

[PATCH] D26350: Keep invalid Switch in the AST

2017-03-17 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart added a comment. Ping https://reviews.llvm.org/D26350 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35190: __builtin_constant_p should consider the parameter of a constexpr function as constant

2017-07-12 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart added a comment. Ping https://reviews.llvm.org/D35190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26350: Keep invalid Switch in the AST

2017-07-14 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart added a comment. re-ping https://reviews.llvm.org/D26350 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35190: __builtin_constant_p should consider the parameter of a constexpr function as constant

2017-07-14 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart added a comment. Is there any objections for this patch? https://reviews.llvm.org/D35190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26350: Keep invalid Switch in the AST

2017-07-14 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart added a comment. The problem i'm trying to solve is precisely to keep as much as possible of the valid AST in the main AST, despite errors. I've already done some work with r249982, r272962 and more, and there is still a lot to do. But the goal is to keep as much as possible of it.

[PATCH] D35172: Keep the IdentifierInfo in the Token for alternative operator keyword

2017-07-09 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart created this revision. Herald added a subscriber: klimek. The goal of this commit is to fix clang-format so it does not merge tokens when using the alternative spelling keywords. (eg: "not foo" should not become "notfoo") The problem is that Preprocessor::HandleIdentifier used to drop

[PATCH] D35172: Keep the IdentifierInfo in the Token for alternative operator keyword

2017-07-10 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart marked an inline comment as done. ogoffart added inline comments. Comment at: lib/Lex/PPExpressions.cpp:242 switch (PeekTok.getKind()) { - default: // Non-value token. + default: +// If this token's spelling is a pp-identifier, check to see if it is

[PATCH] D35172: Keep the IdentifierInfo in the Token for alternative operator keyword

2017-07-10 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart updated this revision to Diff 105815. ogoffart marked an inline comment as done. ogoffart added a comment. Added check for "#if and_eq" https://reviews.llvm.org/D35172 Files: include/clang/Basic/IdentifierTable.h lib/Lex/PPDirectives.cpp lib/Lex/PPExpressions.cpp

[PATCH] D35172: Keep the IdentifierInfo in the Token for alternative operator keyword

2017-07-10 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart updated this revision to Diff 105816. https://reviews.llvm.org/D35172 Files: include/clang/Basic/IdentifierTable.h lib/Lex/PPDirectives.cpp lib/Lex/PPExpressions.cpp lib/Lex/Preprocessor.cpp test/Parser/MicrosoftExtensions.cpp test/Preprocessor/cxx_oper_keyword.cpp

[PATCH] D35190: __builtin_constant_p should consider the parameter of a constexpr function as constant

2017-07-10 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart created this revision. This allows to do something like: constexpr int func(int x) { return __builtin_constant_p(x) ? compute_constexpr(x) : compute_runtime(x); } This kind of code is accepted by GCC since GCC 4.8. The problem was that EvaluateBuiltinConstantP was

[PATCH] D35108: Fix crash parsing invalid code

2017-07-07 Thread Olivier Goffart via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307371: Fix crash parsing invalid code (authored by ogoffart). Changed prior to commit: https://reviews.llvm.org/D35108?vs=105590=105604#toc Repository: rL LLVM https://reviews.llvm.org/D35108

[PATCH] D35190: __builtin_constant_p should consider the parameter of a constexpr function as constant

2017-07-12 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart added a comment. > What if the constexpr function is called with in a non-constexpr context, > e.g. with a random global variable as argument? __builtin_constant_p will still return false in this case, contrary to gcc (whose behavior actually depends on the optimization level). I

[PATCH] D35190: __builtin_constant_p should consider the parameter of a constexpr function as constant

2017-07-13 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart added a comment. Thanks for the link to the bug report. This patch mostly address the evaluation within a constexpr, which is orthogonal to the changes in the backend suggered in that bug report. https://reviews.llvm.org/D35190 ___

[PATCH] D26350: Keep invalid Switch in the AST

2017-07-15 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart added a comment. Thanks for your review and i'll try to address the concerns. I believe tools that really need valid code relies on the diagnostics and bail out on error. On the other hand, tools that may work on code containing error do a best effort to work on the remaining AST .

[PATCH] D35172: Keep the IdentifierInfo in the Token for alternative operator keyword

2017-07-14 Thread Olivier Goffart via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308008: Keep the IdentifierInfo in the Token for alternative operator keyword (authored by ogoffart). Changed prior to commit: https://reviews.llvm.org/D35172?vs=105816=106594#toc Repository: rL

[PATCH] D35190: __builtin_constant_p should consider the parameter of a constexpr function as constant

2017-07-25 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart added a comment. ping https://reviews.llvm.org/D35190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35108: Fix crash parsing invalid code

2017-07-07 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart created this revision. The code in the test caused a crash with this backtrace: RecordLayoutBuilder.cpp:2934: const clang::ASTRecordLayout ::ASTContext::getASTRecordLayout(const clang::RecordDecl *) const: Assertion `!D->isInvalidDecl() && "Cannot get layout of invalid decl!"' failed.

[PATCH] D26350: Keep invalid Switch in the AST

2017-10-16 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart updated this revision to Diff 119142. ogoffart added a comment. Updated the patch so that ActOnStartOfSwitchStmt returns void, and ActOnFinishSwitchStmt will skip some checks in case of error https://reviews.llvm.org/D26350 Files: include/clang/Sema/Sema.h lib/Parse/ParseStmt.cpp

[PATCH] D40242: Do not perform the analysis based warning if all warnings are ignored

2017-11-23 Thread Olivier Goffart via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318900: Do not perform the analysis based warning if the warnings are ignored (authored by ogoffart). Changed prior to commit: https://reviews.llvm.org/D40242?vs=123720=124041#toc Repository: rL

[PATCH] D40242: Do not perform the analysis based warning if all warnings are ignored

2017-11-20 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart created this revision. Do not perform the analysis based warning if all warnings are ignored. This saves some cycles when compiling with "-w". But more importantly, for my tool, this fixes a potential crash which may happen on invalid code. Because the analysis might compute the CFG

[PATCH] D40242: Do not perform the analysis based warning if all warnings are ignored

2017-11-20 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart marked an inline comment as done. ogoffart added a comment. > You should add a test case that demonstrates code which would otherwise > trigger an analysis-based warning but doesn't due to disabling all warnings. No warnings are triggered. Because the diagnostic engine ignores them.

[PATCH] D40242: Do not perform the analysis based warning if all warnings are ignored

2017-11-20 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart updated this revision to Diff 123720. ogoffart added a comment. Herald added a subscriber: klimek. I added a test. I did not add such test before because i know that calling Reset() on the diagnostics is kind of a hack. This change does not have any behavioral difference normally, it

[PATCH] D40242: Do not perform the analysis based warning if all warnings are ignored

2017-11-20 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart added a comment. I do not know how to add a test: there is no real visible change for clang. It just should be faster when passing "-w". https://reviews.llvm.org/D40242 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D40242: Do not perform the analysis based warning if all warnings are ignored

2017-11-20 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart marked an inline comment as done. ogoffart added inline comments. Comment at: lib/Sema/AnalysisBasedWarnings.cpp:2084 + // Do not do any analysis if we are going to just ignore them. + if (Diags.getIgnoreAllWarnings() || + (Diags.getSuppressSystemWarnings() &&

[PATCH] D102027: [SEH] Fix regression with SEH in noexpect functions

2021-05-06 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart added a comment. As reported in https://reviews.llvm.org/D97687#2741449 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102027/new/ https://reviews.llvm.org/D102027 ___ cfe-commits mailing list

[PATCH] D102027: [SEH] Fix regression with SEH in noexpect functions

2021-05-06 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart created this revision. ogoffart requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Commit 5baea0560160a693b19022c5d0ba637b6b46b2d8 set the CurCodeDecl because it

[PATCH] D97687: [SEH] Fix capture of this in lambda functions

2021-05-06 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart added a comment. Looks like changing CurCodeDecl was not a good idea. Fixed in https://reviews.llvm.org/D102027 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97687/new/ https://reviews.llvm.org/D97687

[PATCH] D97687: [SEH] Fix capture of this in lambda functions

2021-03-11 Thread Olivier Goffart via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5baea0560160: [SEH] Fix capture of this in lambda functions (authored by ogoffart). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97687/new/

[PATCH] D97687: [SEH] Fix capture of this in lambda functions

2021-03-03 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart added a comment. Ping? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97687/new/ https://reviews.llvm.org/D97687 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D97534: SEH: capture 'this'

2021-02-26 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart created this revision. ogoffart added reviewers: rnk, asl, cfe-commits. ogoffart requested review of this revision. Herald added a project: clang. Simply make sure that the CodeGenFunction::CXXThisValue and CXXABIThisValue are correctly initialized to the recovered value. For lambda

[PATCH] D97534: SEH: capture 'this'

2021-02-26 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart updated this revision to Diff 326656. ogoffart added a comment. (git-clang-format) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97534/new/ https://reviews.llvm.org/D97534 Files: clang/lib/CodeGen/CGException.cpp clang/test/CodeGenCXX/exceptions-seh-filter-captures.cpp

[PATCH] D97534: SEH: capture 'this'

2021-03-01 Thread Olivier Goffart via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1b04bdc2f3ff: [SEH] capture this (authored by ogoffart). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97534/new/ https://reviews.llvm.org/D97534 Files:

[PATCH] D97687: [SEH] Fix capture of this in lambda functions

2021-03-01 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart created this revision. ogoffart added a reviewer: rnk. ogoffart requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Commit 1b04bdc2f3ffaa7a0e1e3dbdc3a0cd08f0b9a4ce