[PATCH] [clang-tidy] Assert related checkers

Richard legalize at xmission.com
Sat Feb 14 16:51:23 PST 2015


================
Comment at: clang-tidy/misc/AssertSideEffectCheck.h:23
@@ +22,3 @@
+///
+/// The conition of \c assert() is evaluated only in debug builds so a condition
+/// with side effect can cause different behaviour in debug / relesase builds.
----------------
condition misspelled

================
Comment at: clang-tidy/misc/AssertSideEffectCheck.h:25-30
@@ +24,8 @@
+/// with side effect can cause different behaviour in debug / relesase builds.
+class AssertSideEffectCheck : public ClangTidyCheck {
+  const bool CheckFunctionCalls;
+  const std::string RawAssertList;
+  llvm::SmallVector<llvm::StringRef, 5> AssertList;
+
+public:
+  AssertSideEffectCheck(llvm::StringRef Name, ClangTidyContext *Context);
----------------
I always find it odd when reading a class to be shown its internal details before I'm shown its public API.  I guess it saves having to write a single line `private:`, but it makes it more distracting to read the source code.

http://reviews.llvm.org/D7375

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list