diff options
-rw-r--r-- | test/SemaCXX/typo-correction.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
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 <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); + } }; |