diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-01-15 01:23:58 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-01-15 01:23:58 +0000 |
commit | 839192fd29b40fa5307035fa407465f02f3b861c (patch) | |
tree | ba405acf7949e86e280d72046897894e1355c0ab /clang/lib/Serialization/Module.cpp | |
parent | fdcd669bc6939129339eb85db16a1130e98bc168 (diff) | |
download | llvm-839192fd29b40fa5307035fa407465f02f3b861c.zip llvm-839192fd29b40fa5307035fa407465f02f3b861c.tar.gz llvm-839192fd29b40fa5307035fa407465f02f3b861c.tar.bz2 |
Change linkage computation so it doesn't depend on FunctionDecl::isExternC or VarDecl::isExternC, and instead queries what it actually cares about: whether the given declaration is inside an extern "C" context. Fundamentally, figuring out whether a function/variable uses C linkage requires knowing the linkage, and the logic in FunctionDecl::isExternC and VarDecl::isExternC was getting it wrong. Given that, fix FunctionDecl::isExternC and VarDecl::isExternC to use much simpler implementations that depend on the fixed linkage computation.
Fixes a regression to test/SemaCXX/linkage.cpp caused by a new warning exposing the fact that the internal state was wrong.
llvm-svn: 148207
Diffstat (limited to 'clang/lib/Serialization/Module.cpp')
0 files changed, 0 insertions, 0 deletions