[PATCH] D19312: Warn about UB at member function calls from base class ctor initializers.

Filipe Cabecinhas via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 20 09:46:24 PDT 2016

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 function from a ctor-initializer
+      // before the base class results in undefined behavior [12.6.2 16].
+      // FIXME: We only check for member functions directly called from this
For someone reading the source code, it's probably best to mention the different "paths" in the standards here too.
For my usual source browsing, as long as it's in the comment *or* the commit message, I'll eventually see it. But it might throw some people off when they look at C++11, and there's no p16 in that place :-)


More information about the cfe-commits mailing list