Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • T Trilinos
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 936
    • Issues 936
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 22
    • Merge requests 22
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • James Willenbring
  • Trilinos
  • Issues
  • #4294

Closed
Open
Created Jan 29, 2019 by James Willenbring@jmwilleMaintainer

Phalanx: "declaration shadows a typedef" warnings emitted by clang

Created by: CamelliaDPG

@trilinos/phalanx

Expectations

Builds with clang that use the -Wshadow flag should not emit warnings.

Current Behavior

Several such warnings are emitted by clang when building Phalanx_FieldManager_Def.hpp.

.../include/Phalanx_FieldManager_Def.hpp:223:60: warning: declaration shadows a typedef in 'FieldManager<Traits>' [-Wshadow]
  typedef PHX::EvaluationContainer_TemplateManager<Traits> SCTM;
                                                           ^
.../include/Phalanx_FieldManager.hpp:336:62: note: previous declaration is here
    typedef PHX::EvaluationContainer_TemplateManager<Traits> SCTM;
                                                             ^
.../include/Phalanx_FieldManager_Def.hpp:245:60: warning: declaration shadows a typedef in 'FieldManager<Traits>' [-Wshadow]
  typedef PHX::EvaluationContainer_TemplateManager<Traits> SCTM;
                                                           ^
.../include/Phalanx_FieldManager.hpp:336:62: note: previous declaration is here
    typedef PHX::EvaluationContainer_TemplateManager<Traits> SCTM;
                                                             ^
.../include/Phalanx_FieldManager_Def.hpp:269:60: warning: declaration shadows a typedef in 'FieldManager<Traits>' [-Wshadow]
  typedef PHX::EvaluationContainer_TemplateManager<Traits> SCTM;
                                                           ^
.../include/Phalanx_FieldManager.hpp:336:62: note: previous declaration is here
    typedef PHX::EvaluationContainer_TemplateManager<Traits> SCTM;
                                                             ^
.../include/Phalanx_FieldManager_Def.hpp:314:60: warning: declaration shadows a typedef in 'FieldManager<Traits>' [-Wshadow]
  typedef PHX::EvaluationContainer_TemplateManager<Traits> SCTM;
                                                           ^
.../include/Phalanx_FieldManager.hpp:336:62: note: previous declaration is here
    typedef PHX::EvaluationContainer_TemplateManager<Traits> SCTM;
                                                             ^
.../include/Phalanx_FieldManager_Def.hpp:441:60: warning: declaration shadows a typedef in 'FieldManager<Traits>' [-Wshadow]
  typedef PHX::EvaluationContainer_TemplateManager<Traits> SCTM;
                                                           ^
.../include/Phalanx_FieldManager.hpp:336:62: note: previous declaration is here
    typedef PHX::EvaluationContainer_TemplateManager<Traits> SCTM;
                                                             ^
.../include/Phalanx_FieldManager_Def.hpp:456:60: warning: declaration shadows a typedef in 'FieldManager<Traits>' [-Wshadow]
  typedef PHX::EvaluationContainer_TemplateManager<Traits> SCTM;
                                                           ^
.../include/Phalanx_FieldManager.hpp:336:62: note: previous declaration is here
    typedef PHX::EvaluationContainer_TemplateManager<Traits> SCTM;

Possible Solution

Since the shadowing typedef is in each case identical to the shadowed typedef, likely the correct solution is simply to delete the shadowing typedef in each case (delete lines 456, 441, 314, 245, and 223).

Environment

I'm building on a Mac using Apple clang 10.0.0.

Assignee
Assign to
Time tracking