07b49a88df1bad9305696f360f46cbe3b722ba40 |
|
18-Mar-2012 |
David Blaikie <dblaikie@gmail.com> |
Use character literals for vexing initialization fixit hints. Instead of suggesting " = 0" for "char c();", suggest " = '\0'", and similarly for other char types (wide, 16, and 32). Add tests for all these, and since this means testing such hints under C++0x, add tests for some untested C++0x hint cases in the existing code, including suggesting nullptr for pointer initialization. This sets up the initialization helper to provide better type fidelity that will be especially helpful for non-assignment cases (such as fixit-correcting NULL usage in function calls (eg: foo(char) + foo(NULL) => foo('\0') instead of the less informative foo(0))) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153008 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaFixItUtils.cpp
|
e40141542d96f556b5c1b5e3b8acca8f11c27527 |
|
13-Jan-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Refactor for clarity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148135 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaFixItUtils.cpp
|
f037541d5c7dcf3553cf26e4b047be869980c23a |
|
13-Jan-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Don't crash while trying to diagnose a function declared at block scope with an incomplete return type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148088 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaFixItUtils.cpp
|
7984de35644701c0d94336da7f2215d4c26d9f5b |
|
13-Jan-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Improve 0-argument -Wvexing-parse diagnostic by adding notes with fix-its: - If the declarator is at the start of a line, and the previous line contained another declarator and ended with a comma, then that comma was probably a typo for a semicolon: int n = 0, m = 1, l = 2, // k = 5; myImportantFunctionCall(); // oops! - If removing the parentheses would correctly initialize the object, then produce a note suggesting that fix. - Otherwise, if there is a simple initializer we can suggest which performs value-initialization, then provide a note suggesting a correction to that initializer. Sema::Declarator now tracks the location of the comma prior to the declarator in the declaration, if there is one, to facilitate providing the note. The code to determine an appropriate initializer from the -Wuninitialized warning has been factored out to allow use in both that and -Wvexing-parse. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148072 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaFixItUtils.cpp
|
f3546eeef1eed4661b77b93b91a29be1bf5f7d0b |
|
28-Jul-2011 |
Anna Zaks <ganna@apple.com> |
Refactor the */& mismatch fixit generation out of SemaOverload and provide a simple conversion checking function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136376 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaFixItUtils.cpp
|