[clang] 5baea05 - [SEH] Fix capture of this in lambda functions

2021-03-11 Thread Olivier Goffart via cfe-commits
Author: Olivier Goffart Date: 2021-03-11T09:12:42+01:00 New Revision: 5baea0560160a693b19022c5d0ba637b6b46b2d8 URL: https://github.com/llvm/llvm-project/commit/5baea0560160a693b19022c5d0ba637b6b46b2d8 DIFF: https://github.com/llvm/llvm-project/commit/5baea0560160a693b19022c5d0ba637b6b46b2d8.dif

[clang] 1b04bdc - [SEH] capture 'this'

2021-03-01 Thread Olivier Goffart via cfe-commits
Author: Olivier Goffart Date: 2021-03-01T11:57:35+01:00 New Revision: 1b04bdc2f3ffaa7a0e1e3dbdc3a0cd08f0b9a4ce URL: https://github.com/llvm/llvm-project/commit/1b04bdc2f3ffaa7a0e1e3dbdc3a0cd08f0b9a4ce DIFF: https://github.com/llvm/llvm-project/commit/1b04bdc2f3ffaa7a0e1e3dbdc3a0cd08f0b9a4ce.dif

r318900 - Do not perform the analysis based warning if the warnings are ignored

2017-11-23 Thread Olivier Goffart via cfe-commits
Author: ogoffart Date: Thu Nov 23 00:15:22 2017 New Revision: 318900 URL: http://llvm.org/viewvc/llvm-project?rev=318900&view=rev Log: Do not perform the analysis based warning if the warnings are ignored This saves some cycles when compiling with "-w". (Also fix a potential crash on invalid cod

r308008 - Keep the IdentifierInfo in the Token for alternative operator keyword

2017-07-14 Thread Olivier Goffart via cfe-commits
Author: ogoffart Date: Fri Jul 14 02:23:40 2017 New Revision: 308008 URL: http://llvm.org/viewvc/llvm-project?rev=308008&view=rev Log: Keep the IdentifierInfo in the Token for alternative operator keyword The goal of this commit is to fix clang-format so it does not merge tokens when using the al

r307371 - Fix crash parsing invalid code

2017-07-07 Thread Olivier Goffart via cfe-commits
Author: ogoffart Date: Fri Jul 7 02:38:59 2017 New Revision: 307371 URL: http://llvm.org/viewvc/llvm-project?rev=307371&view=rev Log: Fix crash parsing invalid code The code in the test caused a crash with this backtrace: RecordLayoutBuilder.cpp:2934: const clang::ASTRecordLayout &clang::ASTC

[PATCH] D26350: Keep invalid Switch in the AST

2016-11-20 Thread Olivier Goffart 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] D26465: [Diag] Optimize DiagnosticIDs::getDiagnosticSeverity

2016-11-20 Thread Olivier Goffart via cfe-commits
ogoffart added a comment. ping? 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] D26465: [Diag] Optimize DiagnosticIDs::getDiagnosticSeverity

2016-11-09 Thread Olivier Goffart via cfe-commits
ogoffart created this revision. ogoffart added reviewers: cfe-commits, rsmith. Herald added a subscriber: sanjoy. DiagnosticIDs::getDiagnosticSeverity function turns out to take a lot of time in getDecomposedLoc. It is called quite often from different places. (For example from Sema::CheckTempla

[PATCH] D26350: Keep invalid Switch in the AST

2016-11-07 Thread Olivier Goffart via cfe-commits
ogoffart added a comment. I believe only the change in ActOnFinishSwitchStmt might be controversial. Is it breaking an invariant than having switches kept in the AST? https://reviews.llvm.org/D26350 ___ cfe-commits mailing list cfe-commits@lists.ll

[PATCH] D26350: Keep invalid Switch in the AST

2016-11-07 Thread Olivier Goffart via cfe-commits
ogoffart created this revision. ogoffart added reviewers: rsmith, cfe-commits. - When the condition is invalid, replace it by an OpaqueValueExpr - When parsing an invalid CaseStmt, don't drop the sub statement, just return it instead. - In Sema::ActOnStartOfSwitchStmt, always keep the SwitchSt

r285994 - [test] Test that static_assert is properly visited in liblcang

2016-11-04 Thread Olivier Goffart via cfe-commits
Author: ogoffart Date: Fri Nov 4 07:04:16 2016 New Revision: 285994 URL: http://llvm.org/viewvc/llvm-project?rev=285994&view=rev Log: [test] Test that static_assert is properly visited in liblcang Added: cfe/trunk/test/Index/load-staticassert.cpp Added: cfe/trunk/test/Index/load-staticasser

r285986 - [python bindings] Expose CXCursor_FriendDecl as CursorKind.FRIEND_DECL

2016-11-04 Thread Olivier Goffart via cfe-commits
Author: ogoffart Date: Fri Nov 4 01:50:59 2016 New Revision: 285986 URL: http://llvm.org/viewvc/llvm-project?rev=285986&view=rev Log: [python bindings] Expose CXCursor_FriendDecl as CursorKind.FRIEND_DECL CXCursor_FriendDecl was added in r285984 Modified: cfe/trunk/bindings/python/clang/cin

[PATCH] D26285: [index] Expose FriendDecl

2016-11-03 Thread Olivier Goffart via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL285984: [index] Expose FriendDecl (authored by ogoffart). Changed prior to commit: https://reviews.llvm.org/D26285?vs=76873&id=76913#toc Repository: rL LLVM https://reviews.llvm.org/D26285 Files:

r285984 - [index] Expose FriendDecl

2016-11-03 Thread Olivier Goffart via cfe-commits
Author: ogoffart Date: Fri Nov 4 01:29:27 2016 New Revision: 285984 URL: http://llvm.org/viewvc/llvm-project?rev=285984&view=rev Log: [index] Expose FriendDecl Differential Revision: https://reviews.llvm.org/D26285 Modified: cfe/trunk/include/clang-c/Index.h cfe/trunk/lib/Sema/SemaCodeC

[PATCH] D26285: [index] Expose FriendDecl

2016-11-03 Thread Olivier Goffart via cfe-commits
ogoffart created this revision. ogoffart added reviewers: cfe-commits, alexey.klimov.dev, bkramer. I need to be able to visit friend declarations (the function) for the clang based qdoc (documentation parser). This also fix KDevelop not highlighting friend declarations. (Espetialy ennoying when

[PATCH] D26285: [index] Expose FriendDecl

2016-11-03 Thread Olivier Goffart via cfe-commits
ogoffart added a comment. KDevelop bug report: https://bugs.kde.org/show_bug.cgi?id=360509 https://reviews.llvm.org/D26285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D21502: Fix heuristics skipping invalid ctor-initializers with C++11

2016-11-03 Thread Olivier Goffart via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL285883: Fix heuristics skipping invalid ctor-initializers with C++11 (authored by ogoffart). Changed prior to commit: https://reviews.llvm.org/D21502?vs=69223&id=76819#toc Repository: rL LLVM https:

r285883 - Fix heuristics skipping invalid ctor-initializers with C++11

2016-11-03 Thread Olivier Goffart via cfe-commits
Author: ogoffart Date: Thu Nov 3 02:36:17 2016 New Revision: 285883 URL: http://llvm.org/viewvc/llvm-project?rev=285883&view=rev Log: Fix heuristics skipping invalid ctor-initializers with C++11 Use better heuristics to detect if a '{' might be the start of the constructor body or not. Especial

[PATCH] D21502: Fix heuristics skipping invalid ctor-initializers with C++11

2016-10-22 Thread Olivier Goffart via cfe-commits
ogoffart added a comment. Ping? I guess i coud just commit it now. https://reviews.llvm.org/D21502 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23837: Fix colored diagnostics from tools

2016-08-30 Thread Olivier Goffart via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL280118: Fix colored diagnostics from tools (authored by ogoffart). Changed prior to commit: https://reviews.llvm.org/D23837?vs=69225&id=69725#toc Repository: rL LLVM https://reviews.llvm.org/D23837

r280118 - Fix colored diagnostics from tools

2016-08-30 Thread Olivier Goffart via cfe-commits
Author: ogoffart Date: Tue Aug 30 12:42:29 2016 New Revision: 280118 URL: http://llvm.org/viewvc/llvm-project?rev=280118&view=rev Log: Fix colored diagnostics from tools r271042 changed the way the diagnostic arguments are parsed. It assumes that the diagnostics options were already parsed by the

Re: [PATCH] D21502: Fix heuristics skipping invalid ctor-initializers with C++11

2016-08-30 Thread Olivier Goffart via cfe-commits
ogoffart added a comment. Ping https://reviews.llvm.org/D21502 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D21502: Fix heuristics skipping invalid ctor-initializers with C++11

2016-08-30 Thread Olivier Goffart via cfe-commits
ogoffart added a comment. ping https://reviews.llvm.org/D21502 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23837: Fix colored diagnostics from tools

2016-08-30 Thread Olivier Goffart via cfe-commits
ogoffart added a comment. Ping https://reviews.llvm.org/D23837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23837: Fix colored diagnostics from tools

2016-08-25 Thread Olivier Goffart via cfe-commits
ogoffart updated this revision to Diff 69225. ogoffart added a comment. This new patch make sure the test run fine as part of the testsuite, where the output is not a terminal and the color are disabled by default https://reviews.llvm.org/D23837 Files: lib/Tooling/Tooling.cpp unittests/Too

Re: [PATCH] D21502: Fix heuristics skipping invalid ctor-initializers with C++11

2016-08-25 Thread Olivier Goffart via cfe-commits
ogoffart added a comment. Regarding this: struct Foo { Foo() : some_long_x(0), some_| {} int some_long_x, some_long_y; }; That should work fine because the token before the { is the code completion token, not an identifier. This is basicaly tested by the test with CHECK-CC2. Howev

Re: [PATCH] D21502: Fix heuristics skipping invalid ctor-initializers with C++11

2016-08-25 Thread Olivier Goffart via cfe-commits
ogoffart updated this revision to Diff 69223. ogoffart added a comment. Made the requested changes https://reviews.llvm.org/D21502 Files: lib/Parse/ParseCXXInlineMethods.cpp test/CodeCompletion/ctor-initializer.cpp Index: test/CodeCompletion/ctor-initializer.cpp ===

Re: [PATCH] D23837: Fix colored diagnostics from tools

2016-08-25 Thread Olivier Goffart via cfe-commits
ogoffart updated this revision to Diff 69221. ogoffart added a comment. Added a test. https://reviews.llvm.org/D23837 Files: lib/Tooling/Tooling.cpp unittests/Tooling/ToolingTest.cpp Index: unittests/Tooling/ToolingTest.cpp ==

[PATCH] D23837: Fix colored diagnostics from tools

2016-08-24 Thread Olivier Goffart via cfe-commits
ogoffart created this revision. ogoffart added reviewers: bruno, dexonsmith, cfe-commits. Herald added a subscriber: klimek. r271042 changed the way the diagnostic arguments are parsed. It assumes that the diagnostics options were already parsed by the "Driver". For tools using clang::Tooling, the

Re: [PATCH] D21502: Fix heuristics skipping invalid ctor-initializers with C++11

2016-08-24 Thread Olivier Goffart via cfe-commits
ogoffart added a comment. Ping! https://reviews.llvm.org/D21502 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D21502: Fix heuristics skipping invalid ctor-initializers with C++11

2016-06-28 Thread Olivier Goffart via cfe-commits
ogoffart added a comment. Ping. The problem i'm fixing here is how we recover invalid code in the ctor-init part as we skip the function body. In particular, we want to know if the '{' is the begining of the body or not. In C++03, we always consider it as the beginng of the body. The problem

Re: [PATCH] D21497: Fix test to specify C++03 (fails with C++11).

2016-06-19 Thread Olivier Goffart via cfe-commits
ogoffart added a comment. I made http://reviews.llvm.org/D21502 that should also fix this test. http://reviews.llvm.org/D21497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D21497: Fix test to specify C++03 (fails with C++11).

2016-06-19 Thread Olivier Goffart via cfe-commits
ogoffart added a comment. I'm sorry for commiting broken test. However this is supposed to work also in C++11 mode. I'm investigating what's wrong. http://reviews.llvm.org/D21497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://list

Re: [PATCH] D19327: Keep invalid function body as part of the AST

2016-06-16 Thread Olivier Goffart via cfe-commits
ogoffart abandoned this revision. ogoffart added a comment. Replaced by http://reviews.llvm.org/D19764 http://reviews.llvm.org/D19327 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D19764: Keep invalid functions as part of the AST

2016-06-16 Thread Olivier Goffart via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL272962: Keep invalid functions as part of the AST (authored by ogoffart). Changed prior to commit: http://reviews.llvm.org/D19764?vs=55714&id=61034#toc Repository: rL LLVM http://reviews.llvm.org/D1

Re: [PATCH] D20821: Fix a few issues while skipping function bodies

2016-06-16 Thread Olivier Goffart via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL272963: Fix a few issues while skipping function bodies (authored by ogoffart). Changed prior to commit: http://reviews.llvm.org/D20821?vs=60340&id=61035#toc Repository: rL LLVM http://reviews.llvm.

r272962 - Keep invalid functions as part of the AST

2016-06-16 Thread Olivier Goffart via cfe-commits
Author: ogoffart Date: Thu Jun 16 16:39:55 2016 New Revision: 272962 URL: http://llvm.org/viewvc/llvm-project?rev=272962&view=rev Log: Keep invalid functions as part of the AST Differential Revision: http://reviews.llvm.org/D19764 Modified: cfe/trunk/lib/Sema/SemaDecl.cpp cfe/trunk/test/

r272963 - Fix a few issues while skipping function bodies

2016-06-16 Thread Olivier Goffart via cfe-commits
Author: ogoffart Date: Thu Jun 16 16:40:06 2016 New Revision: 272963 URL: http://llvm.org/viewvc/llvm-project?rev=272963&view=rev Log: Fix a few issues while skipping function bodies - In functions with try { } catch { }, only the try block would be skipped, not the catch blocks - The templ

Re: [PATCH] D19763: Functions declared in a scope should not hide previous declaration in earlier scopes

2016-06-16 Thread Olivier Goffart via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL272961: Functions declared in a scope should not hide previous declaration in earlier… (authored by ogoffart). Changed prior to commit: http://reviews.llvm.org/D19763?vs=55712&id=61033#toc Repository:

r272961 - Functions declared in a scope should not hide previous declaration in earlier scopes

2016-06-16 Thread Olivier Goffart via cfe-commits
Author: ogoffart Date: Thu Jun 16 16:39:46 2016 New Revision: 272961 URL: http://llvm.org/viewvc/llvm-project?rev=272961&view=rev Log: Functions declared in a scope should not hide previous declaration in earlier scopes This code should be an error: void foo(int); void f3() { int foo(float

Re: [PATCH] D20821: Fix a few issues while skipping function bodies

2016-06-10 Thread Olivier Goffart via cfe-commits
ogoffart updated this revision to Diff 60340. ogoffart added a comment. Using Parser::ConsumeAndStoreFunctionPrologue this time http://reviews.llvm.org/D20821 Files: lib/Parse/ParseCXXInlineMethods.cpp lib/Parse/ParseObjc.cpp lib/Parse/ParseStmt.cpp lib/Parse/Parser.cpp lib/Sema/SemaD

Re: [PATCH] D18081: Make sizeof and alignof a CXCursor_UnaryExpr

2016-06-09 Thread Olivier Goffart via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL272274: Make sizeof and alignof a CXCursor_UnaryExpr (authored by ogoffart). Changed prior to commit: http://reviews.llvm.org/D18081?vs=50408&id=60187#toc Repository: rL LLVM http://reviews.llvm.org

Re: [PATCH] D18080: CIndex: add support for static_assert

2016-06-09 Thread Olivier Goffart via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL272273: CIndex: add support for static_assert (authored by ogoffart). Changed prior to commit: http://reviews.llvm.org/D18080?vs=50407&id=60186#toc Repository: rL LLVM http://reviews.llvm.org/D18080

r272274 - Make sizeof and alignof a CXCursor_UnaryExpr

2016-06-09 Thread Olivier Goffart via cfe-commits
Author: ogoffart Date: Thu Jun 9 11:16:06 2016 New Revision: 272274 URL: http://llvm.org/viewvc/llvm-project?rev=272274&view=rev Log: Make sizeof and alignof a CXCursor_UnaryExpr So we can match sizeof expressions more accurately than with UnexposedExpr Differential Revision: http://reviews.llv

r272273 - CIndex: add support for static_assert

2016-06-09 Thread Olivier Goffart via cfe-commits
Author: ogoffart Date: Thu Jun 9 11:15:55 2016 New Revision: 272273 URL: http://llvm.org/viewvc/llvm-project?rev=272273&view=rev Log: CIndex: add support for static_assert Differential Revision: http://reviews.llvm.org/D18080 Modified: cfe/trunk/include/clang-c/Index.h cfe/trunk/lib/Sem

Re: [PATCH] D20821: Fix a few issues while skipping function bodies

2016-06-09 Thread Olivier Goffart via cfe-commits
ogoffart added a comment. The idea is that when we see a ") {" or "} {" in the ctor-initializers, (optionally with "..."), it is necessarily the start of the body. Unless there might be lambda expressions within a template aregument, as in: A::A() : Base<[](){return 42; }()>(){} But t

Re: [PATCH] D19763: Functions declared in a scope should not hide previous declaration in earlier scopes

2016-06-09 Thread Olivier Goffart via cfe-commits
ogoffart added a comment. Ping. This would be required for http://reviews.llvm.org/D19764 http://reviews.llvm.org/D19763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18080: CIndex: add support for static_assert

2016-06-09 Thread Olivier Goffart via cfe-commits
ogoffart added a comment. Ping 2. http://reviews.llvm.org/D18080 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18081: Make sizeof and alignof a CXCursor_UnaryExpr

2016-06-09 Thread Olivier Goffart via cfe-commits
ogoffart added a comment. Ping 2. http://reviews.llvm.org/D18081 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D20821: Fix a few issues while skipping function bodies

2016-06-01 Thread Olivier Goffart via cfe-commits
ogoffart updated this revision to Diff 59197. ogoffart added a comment. Right, i forgot about the C++11 initializer list syntax. I hope I got it right now. http://reviews.llvm.org/D20821 Files: lib/Parse/ParseCXXInlineMethods.cpp lib/Parse/ParseObjc.cpp lib/Parse/ParseStmt.cpp lib/Par

[PATCH] D20821: Fix a few issues while skipping function bodies

2016-05-31 Thread Olivier Goffart via cfe-commits
ogoffart created this revision. ogoffart added reviewers: cfe-commits, rsmith, akyrtzi. Herald added a subscriber: klimek. Fix a few issues while skipping function bodies - In functions with try { } catch { }, only the try block would be skipped, not the catch blocks - The template

Re: [PATCH] D20511: Fix crash while parsing variable template with variadic template arguments

2016-05-26 Thread Olivier Goffart via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL270845: Fix crash while parsing variable template with variadic template arguments (authored by ogoffart). Changed prior to commit: http://reviews.llvm.org/D20511?vs=58043&id=58595#toc Repository: rL

r270845 - Fix crash while parsing variable template with variadic template arguments

2016-05-26 Thread Olivier Goffart via cfe-commits
Author: ogoffart Date: Thu May 26 07:55:34 2016 New Revision: 270845 URL: http://llvm.org/viewvc/llvm-project?rev=270845&view=rev Log: Fix crash while parsing variable template with variadic template arguments It is only a crash if the compiler optimize for this!=nullptr because LocalInstantiatio

Re: [PATCH] D20511: Fix crash while parsing variable template with variadic template arguments

2016-05-25 Thread Olivier Goffart via cfe-commits
ogoffart added a comment. I believe this is trivial so i will just commit it. http://reviews.llvm.org/D20511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D19327: Keep invalid function body as part of the AST

2016-05-25 Thread Olivier Goffart via cfe-commits
ogoffart added a comment. Is this better than the alternative http://reviews.llvm.org/D19764 ? http://reviews.llvm.org/D19327 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D20511: Fix crash while parsing variable template with variadic template arguments

2016-05-21 Thread Olivier Goffart via cfe-commits
ogoffart created this revision. ogoffart added reviewers: cfe-commits, rsmith. It is only a crash if the compiler optimize for this!=nullptr because LocalInstantiationScope::getPartiallySubstitutedPack checks if 'this' is null. (This is crashing when clang is compiled with GCC6) http://review

Re: [PATCH] D20054: Fix spurious warnings about unused private field

2016-05-09 Thread Olivier Goffart via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL268895: Fix spurious warnings about unused private field (authored by ogoffart). Changed prior to commit: http://reviews.llvm.org/D20054?vs=56514&id=56530#toc Repository: rL LLVM http://reviews.llvm

r268895 - Fix spurious warnings about unused private field

2016-05-09 Thread Olivier Goffart via cfe-commits
Author: ogoffart Date: Mon May 9 02:09:51 2016 New Revision: 268895 URL: http://llvm.org/viewvc/llvm-project?rev=268895&view=rev Log: Fix spurious warnings about unused private field If the address of a field is taken as a pointer to member, we should not warn that the field is not used. Normal

[PATCH] D20054: Fix spurious warnings about unused private field

2016-05-08 Thread Olivier Goffart via cfe-commits
ogoffart created this revision. ogoffart added reviewers: cfe-commits, djasper. If the address of a field is taken as a pointer to member, we should not warn that the field is not used. Normaly, yse of fields are done from MemberExpr, but in case of pointer to member, it is in a DeclRefExpr

Re: [PATCH] D19764: Keep invalid functions as part of the AST

2016-05-08 Thread Olivier Goffart via cfe-commits
ogoffart added a comment. Ping? http://reviews.llvm.org/D19764 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D19327: Keep invalid function body as part of the AST

2016-04-30 Thread Olivier Goffart via cfe-commits
ogoffart added a comment. An alternative patch is uploaded there: http://reviews.llvm.org/D19764 http://reviews.llvm.org/D19327 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D19764: Keep invalid functions as part of the AST

2016-04-30 Thread Olivier Goffart via cfe-commits
ogoffart created this revision. ogoffart added reviewers: cfe-commits, rsmith. This is an alternative to http://reviews.llvm.org/D19327 We want to keep all the invalid function declarations as part of the AST. This patch depends also on http://reviews.llvm.org/D19763 otherwise the tests in SemaC

[PATCH] D19763: Functions declared in a scope should not hide previous declaration in earlier scopes

2016-04-30 Thread Olivier Goffart via cfe-commits
ogoffart created this revision. ogoffart added reviewers: cfe-commits, rsmith. This code should be an error: void foo(int); void f3() { int foo(float); { float foo(int); // expected-error {{functions that differ only in their return type cannot be overloaded}} } } the f

Re: [PATCH] D19327: Keep invalid function body as part of the AST

2016-04-27 Thread Olivier Goffart via cfe-commits
ogoffart added inline comments. Comment at: lib/Sema/SemaDecl.cpp:5044-5045 @@ -5043,4 +5043,4 @@ // function template specialization, add it to the scope stack. - if (New->getDeclName() && AddToScope && - !(D.isRedeclaration() && New->isInvalidDecl())) { + if (New->get

Re: [PATCH] D19327: Keep invalid function body as part of the AST

2016-04-26 Thread Olivier Goffart via cfe-commits
ogoffart added a comment. Ping? http://reviews.llvm.org/D19327 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D19327: Keep invalid function body as part of the AST

2016-04-20 Thread Olivier Goffart via cfe-commits
ogoffart created this revision. ogoffart added reviewers: cfe-commits, rsmith. struct XX { double foo(invalid_type xx); }; double XX::foo(invalid_type xx) { return 45; } We should keep XX::foo and its function body as part of the AST so tools can still do something with the body even if

Re: [PATCH] D18081: Make sizeof and alignof a CXCursor_UnaryExpr

2016-04-20 Thread Olivier Goffart via cfe-commits
ogoffart added a comment. Ping? http://reviews.llvm.org/D18081 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18080: CIndex: add support for static_assert

2016-04-20 Thread Olivier Goffart via cfe-commits
ogoffart added a comment. Ping? http://reviews.llvm.org/D18080 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D17988: Fix destructor definition of invalid classes

2016-03-19 Thread Olivier Goffart via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL263639: Fix destructor definition of invalid classes (authored by ogoffart). Changed prior to commit: http://reviews.llvm.org/D17988?vs=50124&id=50822#toc Repository: rL LLVM http://reviews.llvm.org

r263639 - Fix destructor definition of invalid classes

2016-03-19 Thread Olivier Goffart via cfe-commits
Author: ogoffart Date: Wed Mar 16 09:36:11 2016 New Revision: 263639 URL: http://llvm.org/viewvc/llvm-project?rev=263639&view=rev Log: Fix destructor definition of invalid classes The declaration of the destructor of an invalid class was not properly marked as noexcept. As a result, the definitio

Re: [PATCH] D16973: Fix ICE with constexpr and friend functions

2016-02-12 Thread Olivier Goffart via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL260675: Fix ICE with constexpr and friend functions (authored by ogoffart). Changed prior to commit: http://reviews.llvm.org/D16973?vs=47146&id=47791#toc Repository: rL LLVM http://reviews.llvm.org/

r260675 - Fix ICE with constexpr and friend functions

2016-02-12 Thread Olivier Goffart via cfe-commits
Author: ogoffart Date: Fri Feb 12 06:34:44 2016 New Revision: 260675 URL: http://llvm.org/viewvc/llvm-project?rev=260675&view=rev Log: Fix ICE with constexpr and friend functions Fix a crash while parsing this code: struct X { friend constexpr int foo(X*) { return 12; } static constex

Re: [PATCH] D16973: Fix ICE with constexpr and friend functions

2016-02-11 Thread Olivier Goffart via cfe-commits
ogoffart added a comment. ping? http://reviews.llvm.org/D16973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16973: Fix ICE with constexpr and friend functions

2016-02-07 Thread Olivier Goffart via cfe-commits
ogoffart updated this revision to Diff 47146. ogoffart added a comment. Optimized by avoiding repeated call to getBody http://reviews.llvm.org/D16973 Files: lib/AST/ExprConstant.cpp test/SemaCXX/constant-expression-cxx11.cpp Index: test/SemaCXX/constant-expression-cxx11.cpp ===

[PATCH] D16973: Fix ICE with constexpr and friend functions

2016-02-07 Thread Olivier Goffart via cfe-commits
ogoffart created this revision. ogoffart added reviewers: rsmith, cfe-commits. Fix a crash while parsing this code: struct X { friend constexpr int foo(X*) { return 12; } static constexpr int j = foo(static_cast(nullptr)); }; I also added a test for the static fu

Re: [PATCH] D13344: Keep the IfStmt node even if the condition is invalid

2015-10-11 Thread Olivier Goffart via cfe-commits
ogoffart abandoned this revision. ogoffart marked an inline comment as done. ogoffart added a comment. commited as r249982. (I forgot to add the link to reviews.llvm.org in the commit message. I'll do it next time) http://reviews.llvm.org/D13344 __

r249982 - Keep the IfStmt node even if the condition is invalid

2015-10-11 Thread Olivier Goffart via cfe-commits
Author: ogoffart Date: Sun Oct 11 12:27:29 2015 New Revision: 249982 URL: http://llvm.org/viewvc/llvm-project?rev=249982&view=rev Log: Keep the IfStmt node even if the condition is invalid This is important to keep the information in IDE or other tools even if the code contains a few errors Modi

Re: [PATCH] D13344: Keep the IfStmt node even if the condition is invalid

2015-10-10 Thread Olivier Goffart via cfe-commits
ogoffart updated this revision to Diff 37035. ogoffart added a comment. The updated patch uses OpaqueValueExpr http://reviews.llvm.org/D13344 Files: lib/Sema/SemaStmt.cpp test/Misc/ast-dump-invalid.cpp Index: test/Misc/ast-dump-invalid.cpp ==

Re: [PATCH] D13344: Keep the IfStmt node even if the condition is invalid

2015-10-10 Thread Olivier Goffart via cfe-commits
ogoffart added a comment. Are the analysis run if there is an error? I think the consumer should expect null condition anyway. But i'll try to add an ErrorExpr anyway. http://reviews.llvm.org/D13344 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D13344: Keep the IfStmt node even if the condition is invalid

2015-10-01 Thread Olivier Goffart via cfe-commits
ogoffart created this revision. ogoffart added a reviewer: cfe-commits. This is quite useful for IDE's or other tools which would like to recover as much as possible even if there are a few errors in the code, and discarding the full 'if' bodies is unfortunate. http://reviews.llvm.org/D13344 F

[PATCH] Keep the IfStmt node even if the condition is invalid

2015-09-29 Thread Olivier Goffart via cfe-commits
Hi, Please review the attached patch. It does not discard the full 'if' statement if the condition is invalid. This is quite useful for IDE's or other tools which would like to recover as much as possible even if there are a few errors in the code, and discarding the full 'if' bodies is unfor

r246844 - Fix the perentheses location when the constructor is called on a class that has a destructor

2015-09-04 Thread Olivier Goffart via cfe-commits
Author: ogoffart Date: Fri Sep 4 05:17:10 2015 New Revision: 246844 URL: http://llvm.org/viewvc/llvm-project?rev=246844&view=rev Log: Fix the perentheses location when the constructor is called on a class that has a destructor Modified: cfe/trunk/lib/Sema/SemaCast.cpp cfe/trunk/test/Sem

Re: [PATCH] fix parentheses location in a CXXConstructExpr

2015-09-03 Thread Olivier Goffart via cfe-commits
On Thursday 3. September 2015 13:41:12 Richard Smith wrote: > On Thu, Sep 3, 2015 at 8:58 AM, Manuel Klimek wrote: > > On Tue, Sep 1, 2015 at 12:31 AM Olivier Goffart wrote: > >> On Monday 31. August 2015 08:07:58 Manuel Klimek wrote: > >> > On Sat, Aug 29, 2015 a

Re: [PATCH] fix parentheses location in a CXXConstructExpr

2015-08-31 Thread Olivier Goffart via cfe-commits
On Monday 31. August 2015 08:07:58 Manuel Klimek wrote: > On Sat, Aug 29, 2015 at 12:23 PM Olivier Goffart via cfe-commits < > > cfe-commits@lists.llvm.org> wrote: > > Hi, > > > > Please review the attached patch. > > > > In Sema::BuildCXXFunctiona

[PATCH] fix parentheses location in a CXXConstructExpr

2015-08-29 Thread Olivier Goffart via cfe-commits
Hi, Please review the attached patch. In Sema::BuildCXXFunctionalCastExpr, if the class has a destructor, the Op.SrcExpr might be a CXXBindTemporaryExpr which we need to unwrap. In the testcase, the first new CHECK worked (because A does not have a destructor), but the second CHECK failed (di

r245560 - Fix crash with two typos in the arguments of a function

2015-08-20 Thread Olivier Goffart via cfe-commits
Author: ogoffart Date: Thu Aug 20 08:11:14 2015 New Revision: 245560 URL: http://llvm.org/viewvc/llvm-project?rev=245560&view=rev Log: Fix crash with two typos in the arguments of a function The problem is that the arguments are of TheCall are reset later to the ones in Args, making TypoExpr put

[PATCH] Fix crash with two typos in the arguments of a function

2015-08-17 Thread Olivier Goffart via cfe-commits
Hi, Attached you will find the fix for a crash on invalid code in clang 3.7 It crashes on this code: void fn2() { f(THIS_IS_AN_ERROR, afunction(afunction_)); } The problem is that the arguments are of TheCall are reset later to the ones in Args. Some TypoExpr that have already been diagno