[cfe-commits] r121505 - /cfe/trunk/lib/Sema/SemaDecl.cpp
jahanian
fjahanian at apple.com
Fri Dec 10 11:34:43 PST 2010
None of these are needed. Are you working around a gcc bug?
- Fariborz
On Dec 10, 2010, at 11:28 AM, Douglas Gregor wrote:
> Author: dgregor
> Date: Fri Dec 10 13:28:19 2010
> New Revision: 121505
>
> URL: http://llvm.org/viewvc/llvm-project?rev=121505&view=rev
> Log:
> Silence a few more uninitialized-value warnings
>
> Modified:
> cfe/trunk/lib/Sema/SemaDecl.cpp
>
> Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=121505&r1=121504&r2=121505&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
> +++ cfe/trunk/lib/Sema/SemaDecl.cpp Fri Dec 10 13:28:19 2010
> @@ -3449,14 +3449,15 @@
> }
>
> FunctionDecl *NewFD;
> - bool isFriend, isVirtual, isExplicit, isVirtualOkay;
> bool isInline = D.getDeclSpec().isInlineSpecified();
> + bool isFriend = false;
> DeclSpec::SCS SCSpec = D.getDeclSpec().getStorageClassSpecAsWritten();
> FunctionDecl::StorageClass SCAsWritten
> = StorageClassSpecToFunctionDeclStorageClass(SCSpec);
> - FunctionTemplateDecl *FunctionTemplate;
> - bool isExplicitSpecialization, isFunctionTemplateSpecialization;
> - unsigned NumMatchedTemplateParamLists;
> + FunctionTemplateDecl *FunctionTemplate = 0;
> + bool isExplicitSpecialization = false;
> + bool isFunctionTemplateSpecialization = false;
> + unsigned NumMatchedTemplateParamLists = 0;
>
> if (!getLangOptions().CPlusPlus) {
> // Determine whether the function was written with a
> @@ -3480,9 +3481,9 @@
> FilterLookupForScope(*this, Previous, DC, S, NewFD->hasLinkage());
> } else {
> isFriend = D.getDeclSpec().isFriendSpecified();
> - isVirtual = D.getDeclSpec().isVirtualSpecified();
> - isExplicit = D.getDeclSpec().isExplicitSpecified();
> - isVirtualOkay = false;
> + bool isVirtual = D.getDeclSpec().isVirtualSpecified();
> + bool isExplicit = D.getDeclSpec().isExplicitSpecified();
> + bool isVirtualOkay = false;
>
> // Check that the return type is not an abstract class type.
> // For record types, this is done by the AbstractClassUsageDiagnoser once
> @@ -3593,7 +3594,6 @@
> true/*HasPrototype*/);
> }
> SetNestedNameSpecifier(NewFD, D);
> - FunctionTemplate = 0;
> isExplicitSpecialization = false;
> isFunctionTemplateSpecialization = false;
> NumMatchedTemplateParamLists = TemplateParamLists.size();
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list