]> granicus.if.org Git - clang/commitdiff
Add an explanatory comment to test/SemaCXX/typo-correction.cpp
authorKaelyn Uhrain <rikka@google.com>
Tue, 11 Oct 2011 17:17:40 +0000 (17:17 +0000)
committerKaelyn Uhrain <rikka@google.com>
Tue, 11 Oct 2011 17:17:40 +0000 (17:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141680 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaCXX/typo-correction.cpp

index adf317b8b95f00af18e01e0aeba1a3ad6786555d..fa32c57fc7edd87a895eaf0ac9cb5db9da9e478a 100644 (file)
@@ -15,8 +15,14 @@ public:
     : _val_(_val) {}
 
   template <class E>
-  error_condition(E _e)
-    {*this = make_error_condition(_e);}
+  error_condition(E _e) {
+    // make_error_condition must not be typo corrected to error_condition
+    // even though the first declaration of make_error_condition has not
+    // yet been encountered. This was a bug in the first version of the type
+    // name typo correction patch that wasn't noticed until building LLVM with
+    // Clang failed.
+    *this = make_error_condition(_e);
+  }
 
 };