NoQ added a comment.
Sorry, couldn't help it. This patch looks so useful and so lonely :)
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:6782
+def warn_member_call_in_ctor_init : Warning<
+ "member function call %0 in ctor-initializer for base class %1 results in "
+
teemperor updated this revision to Diff 55716.
teemperor added a comment.
Merged all tests into one file.
http://reviews.llvm.org/D19312
Files:
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaDeclCXX.cpp
teemperor updated this revision to Diff 55245.
teemperor added a comment.
- Added checks and tests for typeid
- Moved warnings into same warning group
- Check that only possibly evaluated expressions are checked
http://reviews.llvm.org/D19312
Files:
include/clang/Basic/DiagnosticGroups.td
teemperor updated this revision to Diff 55189.
teemperor added a comment.
- Moved checks to the UninitializedFieldVisitor
- Also check for dynamic_cast on this during construction
http://reviews.llvm.org/D19312
Files:
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaDeclCXX.cpp
rtrieu added a subscriber: rtrieu.
rtrieu added a comment.
Have you looked at http://reviews.llvm.org/D6561 which was a previous attempt
at this warning?
http://reviews.llvm.org/D19312
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
filcab added a comment.
The patch needs to get through clang-format.
Should we deal with typeid and dynamic_cast, since they're mentioned in the
same paragraph in the standard?
Comment at: lib/Sema/SemaDeclCXX.cpp:3895
@@ +3894,3 @@
+ // Check if member call is actually
teemperor updated this revision to Diff 54464.
teemperor added a comment.
- Standard reference is now specifying what standard (C++11)
- Added test based on the standard example
- Also check base classes now for member calls (to pass the test from the
standard example).
filcab added a comment.
I meant changing the diff, but if you prefer to have a smaller comment, I'm ok
with the different "paths" in the standards being mentioned only in the commit
message.
Comment at: lib/Sema/SemaDeclCXX.cpp:3941
@@ +3940,3 @@
+ // Calling a member
filcab added a subscriber: filcab.
filcab added a comment.
You might want to mention that it's 12.6.2p16 in C++14/17 but p13 in C++11.
I wonder if we should have the example in the standard, verbatim. (Plus the
added tests you made)
http://reviews.llvm.org/D19312
teemperor updated this revision to Diff 54343.
teemperor added a comment.
- Fixed indentation
http://reviews.llvm.org/D19312
Files:
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaDeclCXX.cpp
test/SemaCXX/ctor-init-with-member-call.cpp
Index:
teemperor created this revision.
teemperor added a reviewer: rsmith.
teemperor added a subscriber: cfe-commits.
According to [12.6.2 p16] calling member functions of the current
class before all the base classes are initialized is undefined behavior.
Some compilers (such as GCC 5.3 + ubsan)
11 matches
Mail list logo