diff options
author | Hans Wennborg <hans@hanshq.net> | 2011-07-12 08:45:31 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2011-07-12 08:45:31 +0000 |
commit | 701d1e77aca7e86348386fdeadcd56ca650f95ad (patch) | |
tree | 281a6097d309cdbf2380800c1668b72a67e5ffa9 /test | |
parent | 91832368ef1c1158c4351bdccaa141dac818f04e (diff) | |
download | clang-701d1e77aca7e86348386fdeadcd56ca650f95ad.tar.gz |
Fix typo correction crash on overloaded functions, pr10283.
It would be cool if we could do overload resolution to suggest
the right function, but at least this fixes the crashing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134976 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/SemaCXX/function-overload-typo-crash.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/SemaCXX/function-overload-typo-crash.cpp b/test/SemaCXX/function-overload-typo-crash.cpp new file mode 100644 index 0000000000..0fea312a97 --- /dev/null +++ b/test/SemaCXX/function-overload-typo-crash.cpp @@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +// PR10283 +void min(); +void min(int); + +template <typename T> void max(T); + +void f() { + fin(); //expected-error {{use of undeclared identifier 'fin'; did you mean 'min'}} + fax(0); //expected-error {{use of undeclared identifier 'fax'; did you mean 'max'}} +} |