65f958dca64ef64d43bf85e871ec64e638ff2602 |
|
22-Oct-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Consider hidden decls for isUsed checks. This fixes pr17624. A FIXME from Richard Smith: It seems to me that the root cause is that a per-Decl 'used' flag doesn't really make much sense in the way we use it now. I think we should either track whether that particular declaration is used (with isUsed scanning the entire redecl chain), or we should only have one flag for the entire redeclaration chain (perhaps by always looking at the flag on either the most recent decl or the canonical decl). Modeling it as "is this declaration or any previous declaration used" is weird, and requires contortions like the loop at the end of Sema::MarkFunctionReferenced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193202 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/warn-func-not-needed.cpp
|
b9725cfb0a50731930a6331beb70f361b4d52a29 |
|
08-Jan-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Mark all subsequent decls used. In the source static void f(); static void f(); template<typename T> static void g() { f(); } static void f() { } void h() { g<int>(); } the call to f refers to the second decl, but it is only marked used at the end of the translation unit during instantiation, after the third f decl has been linked in. With this patch we mark all subsequent decls used, so that it is easy to check if a symbol is used or not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171888 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/warn-func-not-needed.cpp
|
137d6625eb61a41e776d89b39f3cb958d4a21140 |
|
26-Dec-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix a regression from the previous commit. Template instantiation can set the canonical decl to used after subsequent decls have been chained, so we have to check that too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171088 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/warn-func-not-needed.cpp
|
485458aa998c12e43bc9883b49060425d58b351d |
|
26-Dec-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Use the most recent redecl to decide if it is needed. This fixes pr14691, which I think is a regression from r168519. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171077 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/warn-func-not-needed.cpp
|