pcc added a comment.

Mostly looking good, a few style nits.



================
Comment at: include/clang/Basic/DiagnosticDriverKinds.td:409
+
+def err_drv_trivial_auto_var_init_zero_disabled : Warning<
+  "-ftrivial-auto-var-init=zero hasn't been enabled. Enable it at your own 
peril for benchmarking purpose only with "
----------------
`s/Warning/Error/` here? Then I think you won't need to adjust the list of 
warnings without warning flags.


================
Comment at: lib/CodeGen/CGDecl.cpp:993
+        Ty, llvm::APInt::getSplat(BitWidth, llvm::APInt(64, LargeValue)));
+  } else if (Ty->isPtrOrPtrVectorTy()) {
+    auto *PtrTy = cast<llvm::PointerType>(
----------------
No else after return (same below)


================
Comment at: lib/CodeGen/CGDecl.cpp:1037
+  llvm::SmallVector<llvm::Constant *, 8> Struct(StructTy->getNumElements());
+  for (unsigned El = 0; El != Struct.size(); ++El) {
+    Struct[El] = patternFor(CGM, StructTy->getElementType(El));
----------------
Remove braces


================
Comment at: lib/CodeGen/CGDecl.cpp:1183
+    return llvm::ConstantStruct::get(cast<llvm::StructType>(Ty), Values);
+  } else if (Ty->isArrayTy()) {
+    return llvm::ConstantArray::get(cast<llvm::ArrayType>(Ty), Values);
----------------
No else after return, no braces.


================
Comment at: test/CodeGenCXX/trivial-auto-var-init.cpp:180
+// PATTERN-LABEL: test_huge_uninit(
+// PATTTERN: call void @llvm.memset{{.*}}, i8 -86, i64 65536,
+void test_huge_uninit() {
----------------
`PATTERN:`


================
Comment at: test/CodeGenCXX/trivial-auto-var-init.cpp:196
+// PATTERN-LABEL: test_huge_small_init(
+// PATTTERN: call void @llvm.memset{{.*}}, i8 -86, i64 65536,
+// PATTERN: store i8 97,
----------------
`PATTERN:`


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54604/new/

https://reviews.llvm.org/D54604



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to