diff options
author | dim <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
commit | 50b73317314e889cf39c7b1d6cbf419fa7502f22 (patch) | |
tree | be1815eb79b42ff482a8562b13c2dcbf0c5dcbee /lib/Analysis/PseudoConstantAnalysis.cpp | |
parent | dc04cb328508e61aad809d9b53b12f9799a00e7d (diff) | |
download | FreeBSD-src-50b73317314e889cf39c7b1d6cbf419fa7502f22.zip FreeBSD-src-50b73317314e889cf39c7b1d6cbf419fa7502f22.tar.gz |
Vendor import of clang trunk r154661:
http://llvm.org/svn/llvm-project/cfe/trunk@r154661
Diffstat (limited to 'lib/Analysis/PseudoConstantAnalysis.cpp')
-rw-r--r-- | lib/Analysis/PseudoConstantAnalysis.cpp | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/lib/Analysis/PseudoConstantAnalysis.cpp b/lib/Analysis/PseudoConstantAnalysis.cpp index 8f24c43..c8b491a 100644 --- a/lib/Analysis/PseudoConstantAnalysis.cpp +++ b/lib/Analysis/PseudoConstantAnalysis.cpp @@ -68,8 +68,6 @@ bool PseudoConstantAnalysis::wasReferenced(const VarDecl *VD) { const Decl *PseudoConstantAnalysis::getDecl(const Expr *E) { if (const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(E)) return DR->getDecl(); - else if (const BlockDeclRefExpr *BDR = dyn_cast<BlockDeclRefExpr>(E)) - return BDR->getDecl(); else return 0; } @@ -198,18 +196,7 @@ void PseudoConstantAnalysis::RunAnalysis() { break; } - // Case 4: Block variable references - case Stmt::BlockDeclRefExprClass: { - const BlockDeclRefExpr *BDR = cast<BlockDeclRefExpr>(Head); - if (const VarDecl *VD = dyn_cast<VarDecl>(BDR->getDecl())) { - // Add the Decl to the used list - UsedVars->insert(VD); - continue; - } - break; - } - - // Case 5: Variable references + // Case 4: Variable references case Stmt::DeclRefExprClass: { const DeclRefExpr *DR = cast<DeclRefExpr>(Head); if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) { @@ -220,7 +207,7 @@ void PseudoConstantAnalysis::RunAnalysis() { break; } - // Case 6: Block expressions + // Case 5: Block expressions case Stmt::BlockExprClass: { const BlockExpr *B = cast<BlockExpr>(Head); // Add the body of the block to the list |