From: Kaelyn Uhrain Date: Tue, 11 Oct 2011 17:17:40 +0000 (+0000) Subject: Add an explanatory comment to test/SemaCXX/typo-correction.cpp X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=257e17f9b61614a43d6317dcb5ba0801564f25b7;p=clang Add an explanatory comment to test/SemaCXX/typo-correction.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141680 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/SemaCXX/typo-correction.cpp b/test/SemaCXX/typo-correction.cpp index adf317b8b9..fa32c57fc7 100644 --- a/test/SemaCXX/typo-correction.cpp +++ b/test/SemaCXX/typo-correction.cpp @@ -15,8 +15,14 @@ public: : _val_(_val) {} template - 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); + } };