From: Axel Naumann Date: Tue, 9 Sep 2014 07:27:41 +0000 (+0200) Subject: Disable diags of dupe default args (func, templt) temporarily. X-Git-Tag: v6-02-00-rc1~176 X-Git-Url: https://root.cern.ch/gitweb?p=root.git;a=commitdiff_plain;h=18d2c6ee9c744b338a251cdbb34c453ef34cd849 Disable diags of dupe default args (func, templt) temporarily. --- diff --git a/interpreter/llvm/src/tools/clang/lib/Sema/SemaDeclCXX.cpp b/interpreter/llvm/src/tools/clang/lib/Sema/SemaDeclCXX.cpp index 77285ed..20c9b02 100644 --- a/interpreter/llvm/src/tools/clang/lib/Sema/SemaDeclCXX.cpp +++ b/interpreter/llvm/src/tools/clang/lib/Sema/SemaDeclCXX.cpp @@ -483,7 +483,8 @@ bool Sema::MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old, Invalid = false; } } - + +#if 0 // Disable until Diag is rewired // FIXME: If we knew where the '=' was, we could easily provide a fix-it // hint here. Alternatively, we could walk the type-source information // for NewParam to find the last source location in the type... but it @@ -507,6 +508,7 @@ bool Sema::MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old, Diag(OldParam->getLocation(), diag::note_previous_definition) << OldParam->getDefaultArgRange(); +#endif } else if (OldParamHasDfl) { // Merge the old default argument into the new parameter. // It's important to use getInit() here; getDefaultArg() diff --git a/interpreter/llvm/src/tools/clang/lib/Sema/SemaTemplate.cpp b/interpreter/llvm/src/tools/clang/lib/Sema/SemaTemplate.cpp index c2d9a75..a24c1dd 100644 --- a/interpreter/llvm/src/tools/clang/lib/Sema/SemaTemplate.cpp +++ b/interpreter/llvm/src/tools/clang/lib/Sema/SemaTemplate.cpp @@ -1465,8 +1465,11 @@ bool Sema::CheckTemplateParameterList(TemplateParameterList *NewParams, // C++ [temp.param]p12: // A template-parameter shall not be given default arguments // by two different declarations in the same scope. + +#if 0 // Disable until Diag is rewired Diag(NewDefaultLoc, diag::err_template_param_default_arg_redefinition); Diag(OldDefaultLoc, diag::note_template_param_prev_default_arg); +#endif Invalid = true; } else if (MissingDefaultArg && TPC != TPC_FunctionTemplate) { // C++ [temp.param]p11: