[cfe-commits] r118947 - /cfe/trunk/tools/libclang/CIndex.cpp
Nick Lewycky
nicholas at mxc.ca
Fri Nov 12 15:52:43 PST 2010
Author: nicholas
Date: Fri Nov 12 17:52:43 2010
New Revision: 118947
URL: http://llvm.org/viewvc/llvm-project?rev=118947&view=rev
Log:
Use dyn_cast result instead of re-casting. Fixes -Werror build with:
/llvm/tools/clang/tools/libclang/CIndex.cpp:1823: error: unused variable 'E' [-Wunused-variable]
Modified:
cfe/trunk/tools/libclang/CIndex.cpp
Modified: cfe/trunk/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndex.cpp?rev=118947&r1=118946&r2=118947&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndex.cpp (original)
+++ cfe/trunk/tools/libclang/CIndex.cpp Fri Nov 12 17:52:43 2010
@@ -1822,7 +1822,7 @@
if (ExplicitCastExpr *E = dyn_cast<ExplicitCastExpr>(S)) {
EnqueueChildren(WL, C, S);
- WLAddTypeLoc(WL, C, cast<ExplicitCastExpr>(S)->getTypeInfoAsWritten());
+ WLAddTypeLoc(WL, C, E->getTypeInfoAsWritten());
return;
}
More information about the cfe-commits
mailing list