r258317 - Silencing several -Wcast-qual warnings; NFC.
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 20 07:25:30 PST 2016
Author: aaronballman
Date: Wed Jan 20 09:25:30 2016
New Revision: 258317
URL: http://llvm.org/viewvc/llvm-project?rev=258317&view=rev
Log:
Silencing several -Wcast-qual warnings; NFC.
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=258317&r1=258316&r2=258317&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndex.cpp (original)
+++ cfe/trunk/tools/libclang/CIndex.cpp Wed Jan 20 09:25:30 2016
@@ -3594,7 +3594,8 @@ CXEvalResult clang_Cursor_Evaluate(CXCur
expr = Field->getInClassInitializer();
}
if (expr)
- return (CXEvalResult)evaluateExpr((Expr *)expr, C);
+ return const_cast<CXEvalResult>(reinterpret_cast<const void *>(
+ evaluateExpr(const_cast<Expr *>(expr), C)));
return nullptr;
}
@@ -3607,7 +3608,8 @@ CXEvalResult clang_Cursor_Evaluate(CXCur
}
}
if (expr)
- return (CXEvalResult)evaluateExpr(expr, C);
+ return const_cast<CXEvalResult>(
+ reinterpret_cast<const void *>(evaluateExpr(expr, C)));
}
return nullptr;
}
More information about the cfe-commits
mailing list