summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2018-06-26 15:20:20 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2018-06-26 15:20:20 +0000
commit9e2450409e1ad381d93bbe915d8d70c0f1923fc3 (patch)
treef65f89002132218be8390e0f9fe394ebd5c7906d
parent5507f6688def557aca3dbbf7cf53cdf6a13ad8f8 (diff)
downloadbcm5719-llvm-9e2450409e1ad381d93bbe915d8d70c0f1923fc3.tar.gz
bcm5719-llvm-9e2450409e1ad381d93bbe915d8d70c0f1923fc3.zip
Avoid spurious 'comma operator within array index expression' MSVC warning. NFCI.
Split the braces list initialization from the [] map operator to keep MSVC happy. llvm-svn: 335614
-rw-r--r--clang/lib/AST/ItaniumCXXABI.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/AST/ItaniumCXXABI.cpp b/clang/lib/AST/ItaniumCXXABI.cpp
index 2403e048da3..a75ae14f901 100644
--- a/clang/lib/AST/ItaniumCXXABI.cpp
+++ b/clang/lib/AST/ItaniumCXXABI.cpp
@@ -135,9 +135,10 @@ public:
/// Variable decls are numbered by identifier.
unsigned getManglingNumber(const VarDecl *VD, unsigned) override {
- if (auto *DD = dyn_cast<DecompositionDecl>(VD))
- return ++DecompsitionDeclManglingNumbers[
- DecompositionDeclName{DD->bindings()}];
+ if (auto *DD = dyn_cast<DecompositionDecl>(VD)) {
+ DecompositionDeclName Name{DD->bindings()};
+ return ++DecompsitionDeclManglingNumbers[Name];
+ }
const IdentifierInfo *Identifier = VD->getIdentifier();
if (!Identifier) {
OpenPOWER on IntegriCloud