[clang] 96065cf - [Syntax] Silence "unused function" warning in no-assert builds. NFC
Ilya Biryukov via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 7 00:39:00 PST 2019
Author: Ilya Biryukov
Date: 2019-11-07T09:37:25+01:00
New Revision: 96065cf79ff76d5fd4fdaeb2fb2650074b3e0e51
URL: https://github.com/llvm/llvm-project/commit/96065cf79ff76d5fd4fdaeb2fb2650074b3e0e51
DIFF: https://github.com/llvm/llvm-project/commit/96065cf79ff76d5fd4fdaeb2fb2650074b3e0e51.diff
LOG: [Syntax] Silence "unused function" warning in no-assert builds. NFC
A helper `isImpicitExpr` is only used inside assert.
Added:
Modified:
clang/lib/Tooling/Syntax/BuildTree.cpp
Removed:
################################################################################
diff --git a/clang/lib/Tooling/Syntax/BuildTree.cpp b/clang/lib/Tooling/Syntax/BuildTree.cpp
index 1be23f7e7978..dddc265c8c41 100644
--- a/clang/lib/Tooling/Syntax/BuildTree.cpp
+++ b/clang/lib/Tooling/Syntax/BuildTree.cpp
@@ -21,12 +21,14 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/Casting.h"
+#include "llvm/Support/Compiler.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/raw_ostream.h"
#include <map>
using namespace clang;
+LLVM_ATTRIBUTE_UNUSED
static bool isImplicitExpr(clang::Expr *E) { return E->IgnoreImplicit() != E; }
/// A helper class for constructing the syntax tree while traversing a clang
More information about the cfe-commits
mailing list