[compiler-rt] r204597 - Fix a VS compile-time warning

Timur Iskhodzhanov timurrrr at google.com
Mon Mar 24 03:47:37 PDT 2014


Author: timurrrr
Date: Mon Mar 24 05:47:37 2014
New Revision: 204597

URL: http://llvm.org/viewvc/llvm-project?rev=204597&view=rev
Log:
Fix a VS compile-time warning

warning C4345: behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_flags.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_flags.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_flags.cc?rev=204597&r1=204596&r2=204597&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_flags.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_flags.cc Mon Mar 24 05:47:37 2014
@@ -183,8 +183,7 @@ bool FlagInDescriptionList(const char *n
 
 void AddFlagDescription(const char *name, const char *description) {
   if (FlagInDescriptionList(name)) return;
-  FlagDescription *new_description =
-      new(allocator_for_flags) FlagDescription();
+  FlagDescription *new_description = new(allocator_for_flags) FlagDescription;
   new_description->name = name;
   new_description->description = description;
   flag_descriptions.push_back(new_description);





More information about the llvm-commits mailing list