]> granicus.if.org Git - clang/commitdiff
[analyzer] Squash a compile error in r283301.
authorArtem Dergachev <artem.dergachev@gmail.com>
Wed, 5 Oct 2016 08:47:31 +0000 (08:47 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Wed, 5 Oct 2016 08:47:31 +0000 (08:47 +0000)
The constexpr string literal trick isn't supported in MSVC2013.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283303 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h
lib/StaticAnalyzer/Core/BugReporterVisitors.cpp

index c2982a707999075986c7c1bb7eeef3c021043763..fdff74792f5db6bd342e54c69a4f96d6df146375 100644 (file)
@@ -186,10 +186,9 @@ public:
 class ConditionBRVisitor final
     : public BugReporterVisitorImpl<ConditionBRVisitor> {
 
-  static constexpr const char *const GenericTrueMessage =
-      "Assuming the condition is true";
-  static constexpr const char *const GenericFalseMessage =
-      "Assuming the condition is false";
+  // FIXME: constexpr initialization isn't supported by MSVC2013.
+  static const char *const GenericTrueMessage;
+  static const char *const GenericFalseMessage;
 
 public:
   void Profile(llvm::FoldingSetNodeID &ID) const override {
index 08f636df7f968e93e09835ed87e2f5f9cbfd88ac..7045d8bb94c9f79099aeb331fd3bbeb3b59860e6 100644 (file)
@@ -1603,6 +1603,11 @@ ConditionBRVisitor::VisitTrueTest(const Expr *Cond,
   return event;
 }
 
+const char *const ConditionBRVisitor::GenericTrueMessage =
+    "Assuming the condition is true";
+const char *const ConditionBRVisitor::GenericFalseMessage =
+    "Assuming the condition is false";
+
 bool ConditionBRVisitor::isPieceMessageGeneric(
     const PathDiagnosticPiece *Piece) {
   return Piece->getString() == GenericTrueMessage ||