[clang-tools-extra] r289647 - Replace APFloatBase static fltSemantics data members with getter functions

Stephan Bergmann via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 14 03:57:20 PST 2016


Author: sberg
Date: Wed Dec 14 05:57:17 2016
New Revision: 289647

URL: http://llvm.org/viewvc/llvm-project?rev=289647&view=rev
Log:
Replace APFloatBase static fltSemantics data members with getter functions

At least the plugin used by the LibreOffice build
(<https://wiki.documentfoundation.org/Development/Clang_plugins>) indirectly
uses those members (through inline functions in LLVM/Clang include files in turn
using them), but they are not exported by utils/extract_symbols.py on Windows,
and accessing data across DLL/EXE boundaries on Windows is generally
problematic.

Differential Revision: https://reviews.llvm.org/D26671

Modified:
    clang-tools-extra/trunk/clang-tidy/misc/IncorrectRoundings.cpp

Modified: clang-tools-extra/trunk/clang-tidy/misc/IncorrectRoundings.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/IncorrectRoundings.cpp?rev=289647&r1=289646&r2=289647&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/IncorrectRoundings.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/IncorrectRoundings.cpp Wed Dec 14 05:57:17 2016
@@ -23,9 +23,9 @@ namespace misc {
 namespace {
 AST_MATCHER(FloatingLiteral, floatHalf) {
   const auto &literal = Node.getValue();
-  if ((&Node.getSemantics()) == &llvm::APFloat::IEEEsingle)
+  if ((&Node.getSemantics()) == &llvm::APFloat::IEEEsingle())
     return literal.convertToFloat() == 0.5f;
-  if ((&Node.getSemantics()) == &llvm::APFloat::IEEEdouble)
+  if ((&Node.getSemantics()) == &llvm::APFloat::IEEEdouble())
     return literal.convertToDouble() == 0.5;
   return false;
 }




More information about the cfe-commits mailing list