[llvm-branch-commits] [cfe-branch] r119635 - /cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp

Daniel Dunbar daniel at zuster.org
Wed Nov 17 18:36:58 PST 2010


Author: ddunbar
Date: Wed Nov 17 20:36:58 2010
New Revision: 119635

URL: http://llvm.org/viewvc/llvm-project?rev=119635&view=rev
Log:
Merge r118947:
--
Author: Nick Lewycky <nicholas at mxc.ca>
Date:   Fri Nov 12 23:52:43 2010 +0000

    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/branches/Apple/whitney/tools/libclang/CIndex.cpp

Modified: cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp?rev=119635&r1=119634&r2=119635&view=diff
==============================================================================
--- cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp (original)
+++ cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp Wed Nov 17 20:36:58 2010
@@ -1837,7 +1837,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 llvm-branch-commits mailing list